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

Improve handling of comounted cpu,cpuacct controllers #2911

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

brandond
Copy link
Member

@brandond brandond commented Feb 8, 2021

Proposed Changes

Fix handling of comounted v1 controllers.

As noted at rancher/rke2#689 (comment) the order of the comounted controllers in /proc/self/cgroup doesn't always match the order in /sys/fs/cgroup - but we can count on there being an alias in there for each controller that points to the comounted hierarchy.

Types of Changes

  • bugfix
  • cgroupv1

Verification

See linked issue

Linked Issues

#2924
rancher/rke2#689

Further Comments

Also tidied up the code that iterates across the controller lists to be more unified in variable naming, and added some comments explaining whats going on.

@brandond brandond requested a review from a team as a code owner February 8, 2021 23:53
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@briandowns
Copy link
Contributor

Thanks for swapping out the "ifs" for switches. So much cleaner.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@erikwilson
Copy link
Contributor

I think this is good but would be nice to have a cgroup test matrix of some kind

@brandond
Copy link
Member Author

@erikwilson I agree. In one of our recent QA meetings we talked about coming up with a matrix cgroups, rootless, and selinux that we need to test against to cover things that we're frequently seeing regressions on.

@brandond brandond merged commit e061197 into k3s-io:master Feb 10, 2021
@brandond brandond deleted the fix_rke2_689 branch June 6, 2024 21:18
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