Skip to content

Commit a56530d

Browse files
committed
config-linux: Require no cgroup tweaks when linux.resources is unset
Or empty. Using: "resources": {} should mean the same thing as: "resources": null or as not specifying 'resources' at all, so we can drop th "Do not specify" requirement. It's good to be clear about what leaving the properties unset/empty means though. I'd prefer a config-wide rule like [1], but if that is too much to bite off I expect we can at least do that for cases where a new container is joining an existing cgroup. [1]: https://groups.google.com/a/opencontainers.org/forum/#!topic/dev/DWdystx5X3A Subject: Exposing platform defaults Date: Thu, 14 Jan 2016 15:36:26 -0800 Message-ID: <[email protected]> Signed-off-by: W. Trevor King <[email protected]>
1 parent 2239827 commit a56530d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config-linux.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ The Spec does not include naming schema for cgroups.
172172
The Spec does not support per-controller paths for the reasons discussed in the [cgroupv2 documentation][cgroup-v2].
173173
The cgroups will be created if they don't exist.
174174

175-
You can configure a container's cgroups via the `resources` field of the Linux configuration.
176-
Do not specify `resources` unless limits have to be updated.
177-
For example, to run a new process in an existing container without updating limits, `resources` need not be specified.
175+
You can configure a container's cgroups via the OPTIONAL `resources` property.
176+
When `resources` is empty or unset, the runtime MUST NOT alter properties of existing cgroups.
177+
When a subset of `resources` is empty or unset, the runtime MUST not alter the properties of existing cgroups covered by that subset.
178178

179179
A runtime MUST at least use the minimum set of cgroup controllers required to fulfill the `resources` settings.
180180
However, a runtime MAY attach the container process to additional cgroup controllers supported by the system.

0 commit comments

Comments
 (0)