[lxc-devel] [lxc/master] cgfsng: copy parent's cpu settings for monitor too
brauner on Github
lxc-bot at linuxcontainers.org
Sun Sep 23 14:28:19 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 414 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180923/6d82da86/attachment.bin>
-------------- next part --------------
From f83903274efba6cd454f87b2a798eafd2f9baf60 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sun, 23 Sep 2018 16:26:31 +0200
Subject: [PATCH] cgfsng: copy parent's cpu settings for monitor too
Closes https://github.com/lxc/lxd/issues/5060.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/cgroups/cgfsng.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 0f3296919..cfe842ce2 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -586,8 +586,7 @@ static bool cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h, char *cgname)
}
}
- clonechildrenpath =
- must_make_path(cgpath, "cgroup.clone_children", NULL);
+ clonechildrenpath = must_make_path(cgpath, "cgroup.clone_children", NULL);
/* unified hierarchy doesn't have clone_children */
if (!file_exists(clonechildrenpath)) {
free(clonechildrenpath);
@@ -1201,6 +1200,11 @@ static bool monitor_create_path_for_hierarchy(struct hierarchy *h, char *cgname)
if (dir_exists(h->monitor_full_path))
return true;
+ if (!cg_legacy_handle_cpuset_hierarchy(h, cgname)) {
+ ERROR("Failed to handle legacy cpuset controller");
+ return false;
+ }
+
ret = mkdir_p(h->monitor_full_path, 0755);
if (ret < 0) {
ERROR("Failed to create cgroup \"%s\"", h->monitor_full_path);
More information about the lxc-devel
mailing list