[lxc-users] LXC networking bug

Stéphane Graber stgraber at ubuntu.com
Mon Nov 14 15:50:00 UTC 2016


On Mon, Nov 14, 2016 at 03:18:54AM -0500, Saint Michael wrote:
> In LXC networking type phys, the network interface correctly disappears
> from the host, but the container never "returns" the device when it gets
> stopped, and it never starts again, unless the host is rebooted, since the
> device is not there.
> I think the device should go back to the host so the container may start
> again.

All non-virtual interfaces are returned to the parent namespace when a
child namespace dies, that's done by the kernel.

The most likely reason why this isn't happening to you is because the
kernel isn't destroying the container's network namespace, possibly
because of a refcounting issue or because of some kind of loop in the
cleanup code.

There are a number of improvements around network namespace teardown
that's been discussed recently upstream which will hopefully fix this...


Oh, one thing that may be worth mentioning though, if the device you're
passing to the container is actually a virtual device (vlan, bridge,
veth, tap, tun, ...), then the kernel will destroy it rather than move
it to the parent namespace.


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161114/4aa2ff5a/attachment.sig>


More information about the lxc-users mailing list