My device is a network interface. Is there any code I may execute on the host to make sure the container starts again if I need to stop it?
On Mon, Nov 14, 2016 at 10:50 AM, Stéphane Graber <stgra...@ubuntu.com> wrote: > 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 > > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users >
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users