Skip to content

Commit 314d845

Browse files
authored
Improve check for cgroup2 availability (#3413)
The cgroup2 mount may sometimes appear as: ``` $ mount -t cgroup2 none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime) ```
1 parent 0e070f7 commit 314d845

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

microk8s-resources/wrappers/run-containerd-with-args

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUNTIME="runc"
5353
RUNTIME_TYPE="io.containerd.runc.v1"
5454
SNAPSHOTTER=$(snapshotter)
5555

56-
if mount | grep -q 'cgroup2 on /sys/fs/cgroup'; then
56+
if mount -t cgroup2 | grep -q 'type cgroup2'; then
5757
RUNTIME_TYPE="io.containerd.runc.v2"
5858
fi
5959

0 commit comments

Comments
 (0)