[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
Ah the problem was that /etc/mtab was a file, and /run/netns did not show up in it so mount refused to act on it. Changing /etc/mtab to a symlink to /proc/mounts allows me to make those rslave. So it should suffice for lxc to always turn all of / into MS_SLAVE. It currently does so only when / i

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
One way iproute could be helpful here by creating a /run/netns/mnt, onto which one 'iproute' mounts namespace was bind-mounted. Then 'ip netns exec' could setns into that mount namespace, *then* unshare mntns. The /run/netns could be a slave to the host but peer with all its child namepace. (I g

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
The reason iproute is doing this is: /* Make it possible for network namespace mounts to propogate between * mount namespaces. This makes it likely that a unmounting a network * namespace file in one namespace will unmount the network namespace * file in all nam

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
** Changed in: iproute (Ubuntu) Importance: Undecided => Medium ** Changed in: iproute (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1307829

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
Ok I see the problem but am not sure what to do about it. iproute makes /var/run/netns MS_SHARED. When a container starts up, it umounts everything. So the netns bind mounts are being umounted on the host. Ideally it woudl be as simple as marking /var/run/netns MS_SLAVE before spawnign the cont

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
(Please disregard the notice about required logs) -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1307829 Title: network namespace error To manage notifications about this bug go to: ht

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
So the particular files /var/run/netns/whatzit are bind-mounted /proc/self/ns/net files from a task which no longer exists, which are pinning the netns. Interestingly, if I reproduce this by hand by doing term 1: lxc-unshare -s NETWORK -- /bin/bash term 2: mkdir /var/run/netns/z; mount --bind /p

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
** Also affects: linux (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to lxc in Ubuntu. https://bugs.launchpad.net/bugs/1307829 Title: network namespace error To manage notification

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
D'oh, never mind, I see it now. ** No longer affects: nova (Ubuntu) ** Also affects: lxc (Ubuntu) Importance: Undecided Status: New ** Changed in: lxc (Ubuntu) Importance: Undecided => Medium ** Changed in: lxc (Ubuntu) Status: New => Confirmed -- You received this bug not

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
When you say > root@osctrl3dc02:~# ip netns exec vips ip a Is osctrl3dc02 the host or a container? Are you saying that you start a container on the host, and then /var/run/netns/ contents change on the host? -- You received this bug notification because you are a member of Ubuntu Server Te

[Bug 1307829] Re: network namespace error

2014-04-15 Thread Serge Hallyn
Thanks for reporting this bug. You say this is only with namespaces pre-created by openstack. I'm confused on that - why is openstack creating new network namespaces inside the container? I've just tested under precise, and 'ip netns add' does the right thing there, so contrary to what I said be