• D
    Fix now dead cleanup of VMs on libvirtd restart · 80cafba3
    Daniel P. Berrange 提交于
    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
    80cafba3
lxc_driver.c 83.2 KB