-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Quadlet kube support has issues with cgroup setup #16589
Comments
As mentioned in the other issue (#16592 (comment)), we can set these things along with --service-container. |
Reasoning: --service-container is only used and meant when running inside a systemd unit. So we can very well set reasonable defaults for this use case. |
So basically quadlet kubesupport defaults to running with cgroups=split? And --log-level=passthrough. |
No options required for podman kube play |
Yes. Setting these defaults make sense to me. If other users desire different defaults, we can make it configurable in the future. |
But bottom line we are going to need |
No. That's exactly my point. We are free to set different defaults when running in systemd. And we know that we're running in systemd when the --service-container flag (and when PODMAN_SYSTEMD_UNIT) is set. |
if Options.ServiceContainer {
// Create pod/container with cgroups=split
} |
What we do need is the backing code for --cgroups=split though. |
Yes. We need to add it but it doesn't need to be configurable on the CLI. My hope is that this will keep things simple. It's probably best to make all these choices for users. |
Ok I will change my patch to pay attention to the --service-container flag, and eliminate the options. Most of the patch is not the CLI stuff anyways. |
Since we are relying on the containers.conf, the read-only PR that is merged into containers.conf, just needs to be worked into Podman at this point, so this can move forward without waiting for me. |
A friendly reminder that this issue had no activity for 30 days. |
@alexlarsson @vrothberg any update on this? |
A friendly reminder that this issue had no activity for 30 days. |
@alexlarsson @ygalblum is this still an issue? |
Just want to follow up on this issue, as I don't see any RP linked to it, neither mentioned in release notes.
@rhatdan do you know has the patch been merged already? |
Nope, No idea. Could you check if the latest podman works with --service-container. |
I tried with 4.8.1 with no luck. |
When handling a regular
*.container
file, quadlet generates a run command with--cgroups=split
. This generates a cgroup hierarchy like this:In other words, all the processes in the service is part of the toplevel
quadlet-minimal.service
cgroup, which means systemd is aware of them being part of this service.However,
podman kube play
doesn't have this, and currently if you run a.kube
service the resulting cgroup tree is something like this:This means that system isn't aware of any processes except the toplevel conmon processes. We really should implement
--cgroup=split
also for play kube, and have all the cgroup hierarchies that it currently puts inmachine.slice
be a subdirectory of thekube-example.service
cgroup.This also affects the
KillMode=
option that quadlet handles for .kube files. It currently limits things tocontrol-group
ormixed
. But this is not really correct, ascontrol-group
means it will just kill the conmon instances (as they are the only thing in the cgroup), which will leak all the other processes. However, once the above is fixed this should be ok.The text was updated successfully, but these errors were encountered: