]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vircgroup: fix bug in virCgroupEnableMissingControllers
authorPavel Hrdina <phrdina@redhat.com>
Mon, 10 Sep 2018 13:43:42 +0000 (15:43 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 25 Sep 2018 07:59:23 +0000 (09:59 +0200)
If we are on host with systemd we need to build cgroup hierarchy
ourselves for controllers that are not managed by systemd.

As a starting parent we need to force root group because
virCgroupMakeGroup() takes that parent in order to inherit values
for cpuset controller.

By default cpuset controller is managed by systemd so we will never
hit the issue but for v2 cgroups we need to use parent cgroup every
time.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/util/vircgroup.c

index ec411a7b2b12951ac41ff3f8ccfeae19b755b5f8..8508a951d484698f69b93e717765c57050063ba0 100644 (file)
@@ -1491,7 +1491,7 @@ virCgroupEnableMissingControllers(char *path,
     int ret = -1;
 
     if (virCgroupNew(pidleader,
-                     "",
+                     "/",
                      NULL,
                      controllers,
                      &parent) < 0)