opencontainers / opencontainers/runc
feature: crun-like systemd cgroup driver mode
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
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:
-
It violates cgroups "single-writer" rule (described here and here).
-
Not all cgroup-related container settings can be converted to systemd unit properties.
-
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating runc's existing systemd cgroup driver and comparing its behavior with the crun approach described here; done means an option selects the mode and the resulting scope and container sub-cgroup avoid converting settings into systemd properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100