|
|
c480ed |
From 5abd9049c8bdea6170dc455033e37811ba875db8 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <5abd9049c8bdea6170dc455033e37811ba875db8@dist-git>
|
|
|
c480ed |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Date: Mon, 1 Jul 2019 17:06:13 +0200
|
|
|
c480ed |
Subject: [PATCH] vircgroup: fix bug in virCgroupEnableMissingControllers
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
If we are on host with systemd we need to build cgroup hierarchy
|
|
|
c480ed |
ourselves for controllers that are not managed by systemd.
|
|
|
c480ed |
|
|
|
c480ed |
As a starting parent we need to force root group because
|
|
|
c480ed |
virCgroupMakeGroup() takes that parent in order to inherit values
|
|
|
c480ed |
for cpuset controller.
|
|
|
c480ed |
|
|
|
c480ed |
By default cpuset controller is managed by systemd so we will never
|
|
|
c480ed |
hit the issue but for v2 cgroups we need to use parent cgroup every
|
|
|
c480ed |
time.
|
|
|
c480ed |
|
|
|
c480ed |
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
(cherry picked from commit 63b4ed0dd3e1555b4c9d82ef0ca0648493f75af2)
|
|
|
c480ed |
|
|
|
c480ed |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Message-Id: <ae150854a6a02300cd3329c538373b770320f504.1561993099.git.phrdina@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/util/vircgroup.c | 2 +-
|
|
|
c480ed |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
|
|
|
c480ed |
index 6aa30a82be..2328957818 100644
|
|
|
c480ed |
--- a/src/util/vircgroup.c
|
|
|
c480ed |
+++ b/src/util/vircgroup.c
|
|
|
c480ed |
@@ -1495,7 +1495,7 @@ virCgroupEnableMissingControllers(char *path,
|
|
|
c480ed |
int ret = -1;
|
|
|
c480ed |
|
|
|
c480ed |
if (virCgroupNew(pidleader,
|
|
|
c480ed |
- "",
|
|
|
c480ed |
+ "/",
|
|
|
c480ed |
NULL,
|
|
|
c480ed |
controllers,
|
|
|
c480ed |
&parent) < 0)
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|