[libvirt] [PATCH] LXC start after shutdown didn't work

Cédric Bosdonnat cbosdonnat at suse.com
Thu Sep 26 09:53:30 UTC 2013


The bug is that after shutting down an lxc full-distro container, start
always fails. It turns out that shutdown doesn't clean the machine on
the machined side. A workaround is to machinectl terminate the
container. A proper fix would be that machinectl tracks the state of the
init process and cleans the machine if that one disappears.

This fix is the reasonable fix we can have on the libvirt side: really
try to start the container manually if starting it with systemd failed.
It currently never calls the virCgroupNewMachineManual function.
---
 src/util/vircgroup.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index e99caf5..466c170 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1656,9 +1656,6 @@ virCgroupNewMachine(const char *name,
                                          group)) == 0)
         return 0;
 
-    if (rv == -1)
-        return -1;
-
     return virCgroupNewMachineManual(name,
                                      drivername,
                                      pidleader,
-- 
1.8.4




More information about the libvir-list mailing list