[libvirt] [PATCH] Fix now dead cleanup of VMs on libvirtd restart

Eric Blake eblake at redhat.com
Fri Jul 15 19:36:59 UTC 2011

On 07/15/2011 08:37 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> When libvirtd restarts it will attempt to reconnect to existing
> LXC containers. If it loads a XML state file for the container
> the container will appear running. If we fail to read the PID
> file, or fail to connect to the LXC monitor, we should be killing
> off the guest, but if the VMs cgroup does not exist any more,
> cleanup will get skipped. Reading the PID file is also pointless
> since the PID is in the XML statefile
> In lxcReconnectVM we do not need to read the PID file. If part
> of the reconnect process fails we need to run the VM terminate
> code as a safety net.
> In lxcVMTerminate, if we can't obtain the VM cgroup, we know
> the process has died, but we must still run lxcVMCleanup to
> clear out the virDomainObjPtr live state
> * src/lxc/lxc_driver.c: Fix cleanup of dead VMs on restart
> ---
>  src/lxc/lxc_driver.c |   60 +++++++++++++++++++++++++------------------------
>  1 files changed, 31 insertions(+), 29 deletions(-)


Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110715/05dba4eb/attachment-0001.sig>

More information about the libvir-list mailing list