[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On 07/15/2011 08:37 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange 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(-)
> 

ACK.

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

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]