-
Notifications
You must be signed in to change notification settings - Fork 377
cgroup: add support for more systemd properties #1574
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
Conversation
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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
PS you can see which props runc translates in https://github.com/opencontainers/runc/blob/main/docs/systemd.md#cgroup-v2
00c9aad
to
8a51b5d
Compare
Thanks for the review and the hint! I've done some fixes to handle MemoryLow (so now memory->reservation is honored) and added a patch to handle cpu.idle. |
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
8a51b5d
to
fa69503
Compare
I've added basic support for devices management as well (barely tested though!). Pushed to trigger the CI |
20a568b
to
5e5527e
Compare
One thing runc does is it checks systemd version to make sure we only set properties that this version of systemd can understand. For example, This gets more complicated for distros which backports some systemd stuff, and I haven't found an easy solution to that. Theoretically, we can list all properties of whatever uint and see if the one we're about to set is among them, but as far as I remember I played with it only to realize this is costly (even when done once per container start). |
I've added a mechanism to detect unsupported properties and cache the result. |
Ephemeral COPR build failed. @containers/packit-build please check. |
dcaf7e0
to
f05466f
Compare
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
9464296
to
400a63c
Compare
introduce a mechanism to detect and register the properties systemd doesn't support so that we don't attempt to set them next time. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
400a63c
to
d55194b
Compare
LGTM from the CRI-O side (k8s e2e tests looks green). |
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
Closes: #1576