-
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
systemd driver updates CPU quota inconsitently #4622
Comments
@hshiina thanks for the report! I'm currently super busy with some k8s deadlines. But you got quite into the code already, wanna try to open a PR to fix this too? ;) |
Sure. I will try to post a PR. |
Feel free to cc me in the PR :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When CPU quota is updated with fractions,
cpu.max
is updated as specified:However, after another parameter is updated,
cpu.max
is rounded up:It looks the rounded value is passed to systemd:
runc/libcontainer/cgroups/systemd/common.go
Lines 303 to 310 in 74b35d8
However, the original value seems to be written to the file:
runc/libcontainer/cgroups/systemd/v2.go
Line 492 in 74b35d8
Steps to reproduce the issue
cpu.max
:cpu.max
again:We can see how the file is updated in the steps with
tail -f
:Describe the results you received and expected
The CPU quota should be configured consistently whether it is rounded up or not.
What version of runc are you using?
$ runc -v
runc version 1.2.4
commit: v1.2.4-0-g6c52b3f
spec: 1.2.0
go: go1.22.10
libseccomp: 2.5.5
Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: