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 cgroup v2 mounts #378

Merged
merged 4 commits into from
Oct 12, 2021
Merged

Support cgroup v2 mounts #378

merged 4 commits into from
Oct 12, 2021

Conversation

Furisto
Copy link
Collaborator

@Furisto Furisto commented Oct 11, 2021

This supports specifying cgroup mounts on systems with unified hierarchy. In case using cgroup namespaces do not work (could not get it to work with rootless containers), the host cgroup hierarchy is bind mounted into the container instead. Also fixed some path handling issues I noticed.


let stripped = path
.strip_prefix("/")
.with_context(|| format!("failed to strip prefix from {}", path.display()))?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

fix the .display with {:?}?

Copy link
Member

Choose a reason for hiding this comment

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

It is fine because .display isn't a substitute for {:?}.
https://doc.rust-lang.org/std/path/struct.Display.html

@utam0k utam0k merged commit 53bbdc2 into youki-dev:main Oct 12, 2021
@utam0k
Copy link
Member

utam0k commented Oct 12, 2021

Awesome

@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