Skip to content
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

[dind] Move dind processes to a separate cgroup #1859

Merged
merged 4 commits into from
Oct 18, 2024

Conversation

@un-def un-def force-pushed the issue_1854_dind_resource_consraints branch from 9c36231 to c735527 Compare October 17, 2024 16:02
Comment on lines 25 to 30
move_processes_to_nested_cgroup() {
# detect cgroups v2
if [[ -f /sys/fs/cgroup/cgroup.controllers ]]; then
local group=/sys/fs/cgroup/dind
mkdir -p ${group}
xargs -rn1 < /sys/fs/cgroup/cgroup.procs > ${group}/cgroup.procs || true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really helpful to comment why nesting is necessary because it's super non-obvious. As I understand, we cannot have a parent group with running processes, so we move them into a "dummy" nested group?

@un-def un-def changed the title [dind] Enable cgroups v2 nesting [dind] Move dind processes to a separate cgroup Oct 18, 2024
@un-def un-def merged commit e2d34ec into master Oct 18, 2024
23 checks passed
@un-def un-def deleted the issue_1854_dind_resource_consraints branch October 18, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: DinD doesn't allow setting memory or CPU limits
2 participants