crun icon indicating copy to clipboard operation
crun copied to clipboard

cgroup: do not create a sub-cgroup by default

Open giuseppe opened this issue 5 months ago • 2 comments
trafficstars

The run.oci.systemd.subgroup annotation previously defaulted to creating a "container" sub-cgroup on cgroup v2 systems if the annotation was not specified. This change alters the behavior so that no sub-cgroup is created by default.

A sub-cgroup will only be created if the run.oci.systemd.subgroup annotation is explicitly provided with a non-empty value.

Closes: https://github.com/containers/crun/issues/1766

Summary by Sourcery

Change default systemd sub-cgroup behavior to only create a sub-cgroup when the run.oci.systemd.subgroup annotation is explicitly set with a non-empty value.

Enhancements:

  • Make run.oci.systemd.subgroup default to no sub-cgroup instead of "container" and return NULL in code when unset.

Documentation:

  • Update man pages and Markdown docs to reflect that no sub-cgroup is created by default unless explicitly configured.

giuseppe avatar May 29 '25 14:05 giuseppe