From 281c86a0556bd04ad2b3d7264f36c109c646a692 Mon Sep 17 00:00:00 2001 Message-Id: <281c86a0556bd04ad2b3d7264f36c109c646a692@dist-git> From: Pavel Hrdina Date: Mon, 1 Jul 2019 17:08:18 +0200 Subject: [PATCH] util: vircgroupv2: use any controller to create thread directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The assumption that CPU controller would be always enabled is wrong, we should use any available controller to create a new sub-cgroup. Signed-off-by: Pavel Hrdina Reviewed-by: Ján Tomko (cherry picked from commit 535bdf83c0b0372e725650c56b4996ff83406254) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297 Signed-off-by: Pavel Hrdina Message-Id: Reviewed-by: Ján Tomko --- src/util/vircgroupv2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index 10f8a9bbdf..04cbadd6a6 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -398,7 +398,7 @@ virCgroupV2MakeGroup(virCgroupPtr parent ATTRIBUTE_UNUSED, if (create) { if (flags & VIR_CGROUP_THREAD) { - if (virCgroupSetValueStr(group, VIR_CGROUP_CONTROLLER_CPU, + if (virCgroupSetValueStr(group, controller, "cgroup.type", "threaded") < 0) { return -1; } -- 2.22.0