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

cgroups: v2: Enable all controllers from parent #33

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Dec 2, 2022

The test for nested cgroups was failing for v2 cgroups because controllers have to be explicitly enabled for child cgroups.

This change makes sure we enable those controllers for all parents of a nested cgroup that we are creating.
This does not change parents that we did not create.

Fixes #28

Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

Looks solid. Just one question.

crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs Outdated Show resolved Hide resolved
@cpuguy83 cpuguy83 requested a review from danbugs December 2, 2022 16:51
The test for nested cgroups was failing for v2 cgroups because
controllers have to be explicitly enabled for child cgroups.

This change makes sure we enable those controllers for all parents of a
nested cgroup *that we are creating*.
This does not change parents that we did not create.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Copy link
Contributor

@devigned devigned left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@danbugs danbugs left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83 cpuguy83 merged commit e266bbb into containerd:main Dec 3, 2022
@cpuguy83 cpuguy83 deleted the fix_cg2_nesting branch December 3, 2022 21:22
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.

Cargo test fail with test_cgroup
3 participants