Change-Id: I5821dc8a44f724e59cee65e356dfae4fbae04f76 Signed-off-by: LiFeng <lifeng68@huawei.com>
49 lines
1.5 KiB
Diff
49 lines
1.5 KiB
Diff
From 0a353f7e5bc5e8f03f2a2654d51eb48c752a22ea Mon Sep 17 00:00:00 2001
|
|
From: LiFeng <lifeng68@huawei.com>
|
|
Date: Thu, 17 Jan 2019 03:49:16 -0500
|
|
Subject: [PATCH 046/138] Do not test cgroup writeable
|
|
|
|
If we run isulad in docker without cgroup namespace, the base_cgroup will be docker/XXX..,
|
|
mountpoint+base_cgroup may be not exist
|
|
|
|
Signed-off-by: LiFeng <lifeng68@huawei.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 47b12a6..6bfa693 100644
|
|
--- a/src/lxc/cgroups/cgfsng.c
|
|
+++ b/src/lxc/cgroups/cgfsng.c
|
|
@@ -581,7 +581,7 @@ static bool cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h, char *cgname)
|
|
if (slash)
|
|
*slash = '/';
|
|
|
|
- ret = mkdir(cgpath, 0755);
|
|
+ ret = mkdir_p(cgpath, 0755);
|
|
if (ret < 0) {
|
|
if (errno != EEXIST) {
|
|
SYSERROR("Failed to create directory \"%s\"", cgpath);
|
|
@@ -2489,13 +2489,17 @@ static bool cg_hybrid_init(struct cgroup_ops *ops)
|
|
|
|
trim(base_cgroup);
|
|
prune_init_scope(base_cgroup);
|
|
+
|
|
+ /* isulad:
|
|
+ * do not test writeable, if we run isulad in docker without cgroup namespace.
|
|
+ * the base_cgroup will be docker/XXX.., mountpoint+base_cgroup may be not exist
|
|
if (type == CGROUP2_SUPER_MAGIC)
|
|
writeable = test_writeable_v2(mountpoint, base_cgroup);
|
|
else
|
|
writeable = test_writeable_v1(mountpoint, base_cgroup);
|
|
if (!writeable)
|
|
goto next;
|
|
-
|
|
+ */
|
|
if (type == CGROUP2_SUPER_MAGIC) {
|
|
char *cgv2_ctrl_path;
|
|
|
|
--
|
|
1.8.3.1
|
|
|