[lxc-devel] [lxc/master] cgroups: ignore legacy limits on pure cgroup2 systems
brauner on Github
lxc-bot at linuxcontainers.org
Sun Apr 12 08:21:09 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 433 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200412/58f8835c/attachment.bin>
-------------- next part --------------
From b96aa96fe29df6a24ed9e84961cfc8febd50d781 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Sun, 12 Apr 2020 10:19:40 +0200
Subject: [PATCH] cgroups: ignore legacy limits on pure cgroup2 systems
Link: https://github.com/lxc/lxc/issues/3183#issuecomment-612462322
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
src/lxc/cgroups/cgfsng.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 4dad9e4263..522eb412d7 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -2847,6 +2847,9 @@ __cgfsng_ops static bool cgfsng_setup_limits_legacy(struct cgroup_ops *ops,
if (!ops->hierarchies)
return ret_set_errno(false, EINVAL);
+ if (!pure_unified_layout(ops))
+ return log_warn_errno(true, EINVAL, "Ignoring legacy cgroup limits on pure cgroup2 system");
+
sorted_cgroup_settings = sort_cgroup_settings(cgroup_settings);
if (!sorted_cgroup_settings)
return false;
More information about the lxc-devel
mailing list