[PATCH] LXC start after shutdown didn't work

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]