opencontainers / opencontainers/runc

Support "run.oci.systemd.subgroup" annotation

Open
#2,448 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/systemd enhancement
Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

https://github.com/containers/crun/blob/a4f4fb90835bb79cd12bafb14a5b3d3f55edd7c6/crun.1.md#runocisystemdsubgroupsubgroup

run.oci.systemd.subgroup=SUBGROUP

Override the name for the systemd sub cgroup created under the systemd
scope, so the final cgroup will be like:

/sys/fs/cgroup/$PATH/$SUBGROUP

When it is set to the empty string, a sub cgroup is not created.

If not specified, it defaults to container on cgroup v2, and to ""
on cgroup v1.

e.g.

/sys/fs/cgroup//system.slice/foo-352700.scope/container

To avoid diversion across runc and crun, we should use "container" subgroup by default on cgroup2. (EDIT Probably we don't need to change the default: https://github.com/opencontainers/runc/issues/2448#issuecomment-636881647)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked crun.1.md section for run.oci.systemd.subgroup and compare its stated behavior with runc's current systemd cgroup handling. Done means the annotation is supported with the documented subgroup, empty-string, and cgroup-version defaults, including the shown cgroup path behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.