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

cgroup: move proccesses from root group to new /init group #3242

Closed
wants to merge 11 commits into from

Conversation

iwilltry42
Copy link
Collaborator

@iwilltry42 iwilltry42 commented Apr 28, 2021

Proposed Changes

If there are processes running in the root cgroup on a cgroupv2 enabled system, move them to a new /init group and enable subtree_control.
For further info, see the discussion and links in the previous PR: #3237

Types of Changes

Fix for cgroupv2 support.

Verification

Run on a cgroupv2 enabled system

Linked Issues

Further Comments

This is my first time touching cgroups in Go code and reading/writing that part of the k3s code, so there may be some things that could be done different.
The way it's written now, it should only have an effect if there are processes running under the root cgroup.

pkg/daemons/agent/agent.go Outdated Show resolved Hide resolved
@AkihiroSuda
Copy link
Contributor

Can we have CI for cgroup2? (#2887) 🙏

@brandond
Copy link
Member

brandond commented May 6, 2021

Can we have CI for cgroup2? (#2887) 🙏

(this is merged)

@iwilltry42 iwilltry42 force-pushed the fix/cgroupv2 branch 2 times, most recently from b6b1d50 to 8d27d8f Compare May 6, 2021 18:02
@iwilltry42 iwilltry42 requested a review from brandond May 6, 2021 18:02
@brandond
Copy link
Member

brandond commented May 6, 2021

Lets see how the tests look, but you need signoff on your commits.

.gitignore Outdated Show resolved Hide resolved
@AkihiroSuda
Copy link
Contributor

Could you rebase with #3282 to test the change with rootless?

@brandond
Copy link
Member

This looks good, but needs a rebase in order to get the CI checks to run.

@iwilltry42
Copy link
Collaborator Author

@xiaods
Copy link
Contributor

xiaods commented Jul 11, 2021

need rebase code base

@iwilltry42
Copy link
Collaborator Author

@xiaods done ✔️
Rebasing this was an absolute mess, so I effectively dropped my changes during the rebase and re-applied them on top afterwards.
This PR definitely needs to be squashed and merged, as it now contains pretty useless/dumb commits.

@dereknola
Copy link
Member

Closing as Out of Date and has been superseded by other PRs.

@dereknola dereknola closed this Feb 17, 2022
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.

5 participants