]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Treat missing driver cgroup as fatal in LXC driver
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 23 Nov 2012 10:44:39 +0000 (10:44 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 27 Nov 2012 17:02:22 +0000 (17:02 +0000)
The LXC driver relies on use of cgroups to kill off LXC processes
in shutdown. If cgroups aren't available, we're unable to kill
off processes, so we must treat lack of cgroups as a fatal startup
error.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_cgroup.c

index ed86b4368e4565321d7c77fc3cfd5b425b586c74..912233fa34704ab68729db279bf4405c078ccfa0 100644 (file)
@@ -229,10 +229,6 @@ int virLXCCgroupSetup(virDomainDefPtr def)
 
     rc = virCgroupForDriver("lxc", &driver, 1, 0);
     if (rc != 0) {
-        /* Skip all if no driver cgroup is configured */
-        if (rc == -ENXIO || rc == -ENOENT)
-            return 0;
-
         virReportSystemError(-rc, "%s",
                              _("Unable to get cgroup for driver"));
         goto cleanup;