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

Add tests for k8s and fix cgroup issue #47

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Jan 4, 2023

See individual commits for descriptions.

@cpuguy83 cpuguy83 force-pushed the cg2_subtree_parents branch from 80df55e to 0af69a6 Compare January 4, 2023 01:39
This tests running a deployment against a k8s cluster (created by kind).

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the cg2_subtree_parents branch from 0af69a6 to b55fb33 Compare January 4, 2023 01:43
@cpuguy83 cpuguy83 requested review from devigned and Mossaka January 4, 2023 01:53
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!

By skipping parents we were hitting an issue with the way k8s cgroups
are managed since it is creating those cgroups.
This change ensures we apply subtree_control to all parents as needed.

Before this change pods would fail to start due to missing `cpu.weight`
since we were not delegating cgroup control.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the cg2_subtree_parents branch from b55fb33 to 34c1a64 Compare January 4, 2023 18:50
@Mossaka
Copy link
Member

Mossaka commented Jan 4, 2023

Is this PR solving issue #40 ?

@cpuguy83
Copy link
Member Author

cpuguy83 commented Jan 4, 2023

No this only solves a cgroupv2 issue.

I need to work out how to test both cgroupv1 and cgroupv2 since this is entirely dependent on the node the tests are running on.
Probably I will just spin up a VM in qemu.

Copy link
Member

@Mossaka Mossaka 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 db7a04b into containerd:main Jan 9, 2023
@cpuguy83 cpuguy83 deleted the cg2_subtree_parents branch January 9, 2023 22:24
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.

3 participants