Skip to content

Commit

Permalink
Improve check for cgroup2 availability (#3413)
Browse files Browse the repository at this point in the history
The cgroup2 mount may sometimes appear as:

```
$ mount -t cgroup2
none on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
```
  • Loading branch information
neoaggelos authored Aug 30, 2022
1 parent 0e070f7 commit 314d845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion microk8s-resources/wrappers/run-containerd-with-args
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUNTIME="runc"
RUNTIME_TYPE="io.containerd.runc.v1"
SNAPSHOTTER=$(snapshotter)

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

Expand Down

0 comments on commit 314d845

Please sign in to comment.