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

Support systemd named hierarchy and emulate cgroup namespaces for v1 control cgroups #373

Merged
merged 6 commits into from
Oct 10, 2021

Conversation

Furisto
Copy link
Collaborator

@Furisto Furisto commented Oct 8, 2021

This adds two features:

  • If cgroup namespaces are not available we can emulate them using bind mounts.
  • Named hierarchies are cgroup hierarchies with no attached controllers. Systemd uses these to track services. More info here.

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2021

Codecov Report

Merging #373 (c321cd0) into main (b23cfc8) will decrease coverage by 0.13%.
The diff coverage is 80.63%.

@@            Coverage Diff             @@
##             main     #373      +/-   ##
==========================================
- Coverage   74.90%   74.76%   -0.14%     
==========================================
  Files          51       52       +1     
  Lines        7781     8121     +340     
==========================================
+ Hits         5828     6072     +244     
- Misses       1953     2049      +96     

@utam0k
Copy link
Member

utam0k commented Oct 8, 2021

@Furisto I am sorry, but I have conflated this PR.

@Furisto Furisto force-pushed the cg-ns-em-redo branch 2 times, most recently from 620ef5f to 04909e7 Compare October 8, 2021 21:55
@Furisto
Copy link
Collaborator Author

Furisto commented Oct 8, 2021

@utam0k Now it's mergeable again

.with_context(|| format!("failed to mount {:?}", subsystem_mount))
}

fn setup_emulated_subsystem(
Copy link
Member

Choose a reason for hiding this comment

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

Can I ask you to add comments and unit tests for this function?

@Furisto
Copy link
Collaborator Author

Furisto commented Oct 9, 2021

@utam0k PTAL

Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

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

Perfect!

@utam0k utam0k merged commit 429fe3c into youki-dev:main Oct 10, 2021
@Furisto Furisto linked an issue Oct 14, 2021 that may be closed by this pull request
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.

Support for cgroup mount types
3 participants