Skip to content
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

k3s check-config not probing cgroup2 in Debian Bullseye #3897

Closed
jiegec opened this issue Aug 21, 2021 · 3 comments
Closed

k3s check-config not probing cgroup2 in Debian Bullseye #3897

jiegec opened this issue Aug 21, 2021 · 3 comments

Comments

@jiegec
Copy link

jiegec commented Aug 21, 2021

I am using Debian Bullseye, which enables cgroups v2 by default:

$ mount | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)

And k3s check-config says that it did not find cgroup hierarchy:

$ sudo k3s check-config
Generally Necessary:
- cgroup hierarchy: nonexistent?? (fail)
    (see https://github.com/tianon/cgroupfs-mount)

Relevant code:

cgroupSubsystemDir="$(awk '/[, ](cpu|cpuacct|cpuset|devices|freezer|memory)[, ]/ && $3 == "cgroup" { print $2 }' /proc/mounts | head -n1)"
cgroupDir="$(dirname "$cgroupSubsystemDir")"
if [ -d "$cgroupDir/cpu" ] || [ -d "$cgroupDir/cpuacct" ] || [ -d "$cgroupDir/cpuset" ] || [ -d "$cgroupDir/devices" ] || [ -d "$cgroupDir/freezer" ] || [ -d "$cgroupDir/memory" ]; then
wrap_good 'cgroup hierarchy' "properly mounted [$cgroupDir]"
else
if [ "$cgroupSubsystemDir" ]; then
wrap_bad 'cgroup hierarchy' "single mountpoint! [$cgroupSubsystemDir]"
else
wrap_bad 'cgroup hierarchy' 'nonexistent??'
fi
echo " $(wrap_color '(see https://github.com/tianon/cgroupfs-mount)' yellow)"
fi

@mkesper
Copy link

mkesper commented Aug 26, 2021

This PR seems to be related: #3230

@jiegec
Copy link
Author

jiegec commented Aug 26, 2021

This PR seems to be related: #3230

Yes, that pr should fix this issue. I am not having problems running k3s on Debian Bullseye with cgroup v2 though.

@stale
Copy link

stale bot commented Feb 22, 2022

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 180 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

@stale stale bot added the status/stale label Feb 22, 2022
@jiegec jiegec closed this as completed Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants