Re: [libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-26 Thread Daniel Veillard
On Tue, Jun 24, 2008 at 08:51:36AM -0700, Dan Smith wrote: > Changes: > - Remove extraneous "i" variables from various functions > - Only bring up lo if we have other interfaces (and thus NETNS) > - Fail setup of interfaces if NETNS support is not present > - Only add CLONE_NEWNET to start flag

Re: [libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-25 Thread Dan Smith
DL> So the container is supposed to stay alive until we explicitly DL> shutdown it, right ? It is supposed to, yes. If it dies early, we catch it with the signal handler and do the cleanup. If it's terminated by the user, we do the cleanup as part of the termination process. -- Dan Smith IBM L

Re: [libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-25 Thread Daniel Lezcano
Dan Smith wrote: DL> Is it called when the last process of the container dies ? Yes, it (lxcVMCleanup()) is called from lxcSigHandler() which gets run if the container dies unexpectedly. It's also called from lxcDomainDestroy() which covers the 'shutdown' and 'destroy' cases as well. So the c

Re: [libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-25 Thread Dan Smith
DL> Is it called when the last process of the container dies ? Yes, it (lxcVMCleanup()) is called from lxcSigHandler() which gets run if the container dies unexpectedly. It's also called from lxcDomainDestroy() which covers the 'shutdown' and 'destroy' cases as well. -- Dan Smith IBM Linux Tech

Re: [libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-25 Thread Daniel Lezcano
Dan Smith wrote: Changes: - Remove extraneous "i" variables from various functions - Only bring up lo if we have other interfaces (and thus NETNS) - Fail setup of interfaces if NETNS support is not present - Only add CLONE_NEWNET to start flags if domain has interfaces defined - Make lxc_vm_

[libvirt] [PATCH 4 of 4] [LXC] Add setup/cleanup of container network interfaces

2008-06-24 Thread Dan Smith
Changes: - Remove extraneous "i" variables from various functions - Only bring up lo if we have other interfaces (and thus NETNS) - Fail setup of interfaces if NETNS support is not present - Only add CLONE_NEWNET to start flags if domain has interfaces defined - Make lxc_vm_t parameters const