-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cgroup pre-checks do not support cgroups v2 #232
Comments
Similar issue checking cpuset cgroup: fatal: [worker03]: FAILED! => {
"assertion": "k3s_check_cgroup_option.rc == 0",
"changed": false,
"evaluated_to": false,
"msg": "cpuset cgroup disabled. If you are running Alpine Linux, see:\nhttps://rancher.com/docs/k3s/latest/en/advanced/#additional-preparation-for-alpine-linux-setup\n"
} BEFORE:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 0 127 1
cpu 0 127 1
cpuacct 0 127 1
blkio 0 127 1
memory 0 127 1
devices 0 127 1
freezer 0 127 1
net_cls 0 127 1
perf_event 0 127 1
net_prio 0 127 1
hugetlb 0 127 1
pids 0 127 1
rdma 0 127 1
misc 0 127 1 AFTER:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpu 0 163 1
cpuacct 0 163 1
blkio 0 163 1
memory 0 163 1
devices 0 163 1
freezer 0 163 1
net_cls 0 163 1
perf_event 0 163 1
net_prio 0 163 1
hugetlb 0 163 1
pids 0 163 1
rdma 0 163 1
misc 0 163 1 Causecgroupv1 features are progressively being trimmed out of the kernel by default: https://lore.kernel.org/lkml/[email protected]/T/ WorkaroundDisable validation checks: Fix
$ cat /sys/fs/cgroup/cgroup.controllers
cpuset cpu io memory hugetlb pids rdma misc PRFix: #233 |
Awesome find, thank you! |
Summary
The cgroup pre-check task uses the command
grep -E "^{{ cgroup.name }}\s+.*\s+1$" /proc/cgroups
to check if all cgroup controllers are enabled properly. Because the/proc/cgroups
file is meaningless for v2, this check may fail inadvertently.In my case, on a host running an up-to-date Arch Linux, the file
/proc/cgroups
does not include thememory
controller for whatever reason. However, the file/sys/fs/cgroup
reports the enabled controllers correctly.This is the output of the deprecated
/proc/cgroups
file on the affected system:And this is the output of the
/sys/fs/cgroup
file on the affected system:Issue Type
Controller Environment and Configuration
I am using ansible-role-k3s v3.4.4.
Steps to Reproduce
N/A
Expected Result
cgroups pre-check is successful if the controller is included in
/sys/fs/cgroup/cgroup.controllers
Actual Result
cgroups pre-check fails even if the controller is included in
/sys/fs/cgroup/cgroup.controllers
The text was updated successfully, but these errors were encountered: