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

feature: crun-like systemd cgroup driver mode #4072

Open
kolyshkin opened this issue Oct 13, 2023 · 0 comments
Open

feature: crun-like systemd cgroup driver mode #4072

kolyshkin opened this issue Oct 13, 2023 · 0 comments

Comments

@kolyshkin
Copy link
Contributor

kolyshkin commented Oct 13, 2023

Runc creates systemd scope (and tries to convert all cgroup-related container settings to systemd unit properties), and on top of that applies all the settings directly to cgroupfs. This method has a few problems:

  1. It violates cgroups "single-writer" rule (described here and here).

  2. Not all cgroup-related container settings can be converted to systemd unit properties.

  3. For those settings that can be converted, such conversion is not always straightforward (examples are cpuset and device access rules).

Unlike runc, crun uses a different approach: it creates a systemd scope with only Delegate=yes property set (i.e. no conversion from container settings to systemd unit properties is performed), then creates a sub-cgroup (aptly named container) under the scope, and then only deals with the sub-cgroup. Essentially, this solves all the problems listed above.

I propose to add an option (runtime flag, build flag etc.) to switch runc systemd cgroup drivers to crun-like mode. In addition to solving the above problems, this will make it easier for upper-level tools to switch between crun and runc.

Obsoletes: #2436

@kolyshkin kolyshkin changed the title feature: crun-like systemd cgroup manager feature: crun-like systemd cgroup driver mode Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants