-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix DevicesSets being removed when cpusets are reloaded with cgroup v2 #17535
Fix DevicesSets being removed when cpusets are reloaded with cgroup v2 #17535
Conversation
…evices This validates the fix in #17535
This is great @TrueBrain! On your branch, can you run I turned your repro steps into an e2e test in #17546, can confirm it seems to work. Most cgroups tests are in the before (main)
after with (7bdde48)
|
Shall I also cherry-pick your e2e in this PR? And awesome, happy there is a place for some e2e for this :D |
Go for it! |
This meant that if any allocation was created or removed, all active DevicesSets were removed from all cgroups of all tasks. This was most noticeable with "exec" and "raw_exec", as it meant they no longer had access to /dev files.
7bdde48
to
ff48ba8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This meant that if any allocation was created or removed, all active DevicesSets were removed from all cgroups of all tasks.
This was most noticeable with "exec" and "raw_exec", as it meant they no longer had access to
/dev
files.Fixes #12877, and possibly a bunch of other related but different reports in the issue tracker. See #12877 (comment) for steps how to reproduce this problem, and validate it is actually fixed with this change. Most important piece of context: https://github.com/opencontainers/runc/blob/5cf9bb229feed19a767cbfdf9702f6487341e29e/libcontainer/cgroups/devices/v2.go#L55-L57
Few warnings:
PS: I checked if there were any e2e tests this could be part of; but it seems there is nothing there yet, neither for cgroup or cpuset. If I missed it, please let me know.