-
Notifications
You must be signed in to change notification settings - Fork 63
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 option only honoured if not running in container #74
Comments
Elaborating on the issue, here's (rootless) Docker as an example for an application requiring cgroups.
The daemon is running, but
The daemon will additonally mention:
To resolve, /sys/fs/cgroup has to at least be made writeable (docker wants to create the systemd cgroup there) and the
(At startup, At this point |
See #103 for some more thoughts on this situation. @kevcrumb I notice you chose to use cgroup1 inside the container. What is that decision based on? The fact that the docker service basically assumes cgroup1, or did you try cgroup2 and it caused issues? Could you try again with cgroup2 and a docker service run file with the cgroup handling removed? |
Default to cgroup2 Attempt to mount cgroup2 in containers to support nesting Mount the systemd tracking cgroup when using cgroup1 Closes void-linux#74
Currently the cgroup hierarchy is only mounted if not running in a virtualized environment (as added via #58):
void-runit/core-services/00-pseudofs.sh
Line 13 in 42ca737
However even inside a container it is sometimes preferable to have the guest system initialize cgroups if available¹.
The current situation allows
CGROUP_MODE
to be set to none (or any other string than hybrid, legacy, or unified) to disable such behavior, but no option to enforce the behavior even in a virtualized environment.Unless one starts messing with files which are prone to be overwritten on every update, or one duplicates the code which incurs technical debt.
I am not involved with the topic enough to gauge the effects of enabling this in containers by default however, and I expect the solution to be more involved than to remove that
if
, hence the issue rather than a PR.¹: In my case
lxc.mount.auto = cgroup:mixed:force
is not available, so the only reasonable way is for this to be handled by the code there.The text was updated successfully, but these errors were encountered: