-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed. #3804
libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed. #3804
Conversation
68168b7
to
fad60b8
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.
Overall the fix makes sense to me -- we should not update a non-frozen container.
Will take a deeper look later.
6bacdf5
to
446bf56
Compare
@jiusanzhou you need to Update: ah, I see you've rebased already. |
For the commit subject, I suggest something like
For the description, you can get some text from #3803 to describe what happens and then go on to say how the commit is fixing this. |
ac81a17
to
53a8bd4
Compare
@kolyshkin thank you for your advice, CI checking is green now. Please take another look. |
53a8bd4
to
cbfa85b
Compare
@cyphar PTAL |
cbfa85b
to
01caf55
Compare
01caf55
to
ad9e9b9
Compare
any update? |
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
In code we have frozen the cgroup to avoid the processes get an occasional "permission denied" error, while the systemd's application of device rules is done disruptively. When the processes in the container can not be frozen over 2 seconds (which defined in fs/freezer.go), we still update the cgroup which resulting the container get an occasional "permission denied" error in some cases. Return error directly without updating cgroup, when freeze fails. Fixes: opencontainers#3803 Signed-off-by: Zoe <[email protected]>
ad9e9b9
to
62963fe
Compare
@opencontainers/runc-maintainers PTAL |
Can we have a test? |
I'm not sure we can. To test the branch of code being added, we need cgroup freeze to fail, and I don't know how to do that reliably. |
@jiusanzhou can you open a PR against |
1.1 backport: #3921 |
In code we have frozen the cgroup to avoid the processes get
an occasional "permission denied" error, while the systemd's application of device
rules is done disruptively. When the processes in the container can not
be frozen over 2 seconds (which defined in fs/freezer.go),
we still update the cgroup which resulting the container get an occasional
"permission denied" error in some cases.
This PR make sure to return error directly without updating cgroup, when freeze fails.
Fixes: #3803