-
Notifications
You must be signed in to change notification settings - Fork 277
Fix cgroup checks for containers #3093
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
base: main
Are you sure you want to change the base?
Conversation
Note: container ran with this command:
|
We added this check specifically for a problem that @nickygerritsen had. When not properly set he saw So one option would be to test that it's not just this but there is more after the WDYT? |
I am not sure that we should enforce a path prefix in the cgroup hierarchy. When running in a systemd slice it will exist, and when running in a container it might exist depending on your deployment. There might be people out there using a different setup where there is no path prefix. Let me dig a little deeper. |
@meisterT After digging some deeper, I do not think it makes sense to enforce a prefix of the initiating process in the cgroup hierarchy. |
If this is a revert I prefer to see the old commit also for the discussion. Just to be sure, you can run a working judgedaemon in your podman container? |
@Kevinjil have you found a platform where we would see |
So far, from what I've noticed, is that you can perfectly fine run processes with a cgroup line of I've been playing around with a non-systemd distro to see how they behave. I picked Alpine, which uses OpenRC. When you open a shell, you are actually in the As time is limited, I assume that most init systems will assign a cgroup with prefix if you run a service when cgroups are enabled. I'll update the PR. P.S. something to discuss during NWERC: we might want to either update our software requirements in the manual or change some scripts, as there are quite some hidden assumptions. |
So far, from what I've noticed, is that you can perfectly fine run processes with a cgroup line of 0::/. I've been playing around with a non-systemd distro to see how they behave. I picked Alpine, which uses OpenRC. When you open a shell, you are actually in the 0::/ cgroup. But, as soon as you launch it on boot using the init system, it assigns you a cgroups service is running. As time is limited, I assume that most init systems will assign a cgroup with prefix if you run a service when cgroups are enabled. Therefore, we now assume that we have an invalid configuration if the cgroup prefix is empty.
e221511
to
7b49876
Compare
There does not have to be a
slice
string in containers. For example, when running the container in podman:Fixes starting issue introduced in b272039