Skip to content

Commit

Permalink
Clarify cgroups path handling behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
  • Loading branch information
mrunalp committed May 17, 2017
1 parent 3036273 commit 81c9f31
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,16 @@ If a `cgroupsPath` value is specified, the runtime MUST consistently attach to t
Implementations of the Spec can choose to name cgroups in any manner.
The Spec does not include naming schema for cgroups.
The Spec does not support per-controller paths for the reasons discussed in the [cgroupv2 documentation][cgroup-v2].
The cgroups will be created if they don't exist.

You can configure a container's cgroups via the `resources` field of the Linux configuration.
Do not specify `resources` unless limits have to be updated.
The runtime MUST create the cgroups specified by the `cgroupsPath` if they don't exist.
If `cgroupsPath` is empty, then the behavior is runtime implementation specific.

The runtime MUST ensure that the container process is attached to the cgroups specified by `cgroupsPath`.
If any property is set under `resources` then the runtime MUST set it for the container.
Check individual properties for any specific handling.

For example, to run a new process in an existing container without updating limits, `resources` need not be specified.

Runtimes MAY attach the container process to additional cgroup controllers beyond those necessary to fulfill the `resources` settings.

### Example

Expand Down

0 comments on commit 81c9f31

Please sign in to comment.