Skip to content

Commit e221511

Browse files
committed
Fix cgroup checks for containers
There does not have to be a `slice` string in containers. For example, when running the container in podman: ``` 5ad0debee049:/$ cat /proc/self/cgroup 0::/libpod_parent/libpod-5ad0debee049e150d851d81fa3e8184ee20725412e5702c7ffe3aae7e5173207 ```
1 parent 95df1de commit e221511

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

judge/create_cgroups.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ You can try using cgroup V1 by adding systemd.unified_cgroup_hierarchy=0 to the
3434
if ! echo "+cpuset" >> /sys/fs/cgroup/cgroup.subtree_control; then
3535
cgroup_error_and_usage "Error: Cannot add +cpuset to cgroup.subtree_control; check kernel params."
3636
fi
37-
if ! grep -q "slice" /proc/self/cgroup; then
38-
cgroup_error_and_usage "Error: Cgroups not configured properly, missing systemd slice under /proc/self/cgroup. If running under docker, make sure to set cgroupns=host."
39-
fi
4037

4138
else # Trying cgroup V1:
4239

0 commit comments

Comments
 (0)