You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be confusion about whether the empty string (and
possible other values that match Go's zero values) qualifies as "set"
or not [1]. This commit clarifies that Go zero values are not
relevant to the spec, but it does not address how they should be
handled (I'm leaving that to follow-up work).
[1]: opencontainers#823 (comment)
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: config-linux.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The following parameters can be specified to set up namespaces:
39
39
The runtime MUST place the container process in the namespace associated with that `path`.
40
40
The runtime MUST [generate an error](runtime.md#errors) if `path` is not associated with a namespace of type `type`.
41
41
42
-
If `path` is not specified, the runtime MUST create a new [container namespace](glossary.md#container-namespace) of type `type`.
42
+
If `path` is [unset](glossary.md#set), the runtime MUST create a new [container namespace](glossary.md#container-namespace) of type `type`.
43
43
44
44
If a namespace type is not specified in the `namespaces` array, the container MUST inherit the [runtime namespace](glossary.md#runtime-namespace) of that type.
45
45
If a `namespaces` field contains duplicated namespaces with same `type`, the runtime MUST [generate an error](runtime.md#errors).
@@ -176,18 +176,18 @@ The path to the cgroups can be specified in the Spec via `cgroupsPath`.
176
176
If `cgroupsPath` is:
177
177
* ... an absolute path (starting with `/`), the runtime MUST take the path to be relative to the cgroup mount point.
178
178
* ... a relative path (not starting with `/`), the runtime MAY interpret the path relative to a runtime-determined location in the cgroup hierarchy.
179
-
* ... not specified, the runtime MAY define the default cgroup path.
179
+
* ... [unset](glossary.md#set), the runtime MAY define the default cgroup path.
180
180
Runtimes MAY consider certain `cgroupsPath` values to be invalid, and MUST generate an error if this is the case.
181
-
If a `cgroupsPath` value is specified, the runtime MUST consistently attach to the same place in the cgroup hierarchy given the same value of `cgroupsPath`.
181
+
If a `cgroupsPath` value is [set](glossary.md#set), the runtime MUST consistently attach to the same place in the cgroup hierarchy given the same value of `cgroupsPath`.
182
182
183
183
Implementations of the Spec can choose to name cgroups in any manner.
184
184
The Spec does not include naming schema for cgroups.
185
185
The Spec does not support per-controller paths for the reasons discussed in the [cgroupv2 documentation][cgroup-v2].
186
186
The cgroups will be created if they don't exist.
187
187
188
188
You can configure a container's cgroups via the `resources` field of the Linux configuration.
189
-
Do not specify`resources` unless limits have to be updated.
190
-
For example, to run a new process in an existing container without updating limits, `resources`need not be specified.
189
+
Do not [set](glossary.md#set)`resources` unless limits have to be updated.
190
+
To run a new process in an existing container without updating limits, `resources`SHOULD be [unset](glossary.md#set).
191
191
192
192
Runtimes MAY attach the container process to additional cgroup controllers beyond those necessary to fulfill the `resources` settings.
193
193
@@ -218,9 +218,9 @@ Each entry has the following structure:
218
218
219
219
***`allow`***(boolean, REQUIRED)* - whether the entry is allowed or denied.
220
220
***`type`***(string, OPTIONAL)* - type of device: `a` (all), `c` (char), or `b` (block).
221
-
Unset values mean "all", mapping to `a`.
221
+
Defaults to `a`.
222
222
***`major, minor`***(int64, OPTIONAL)* - [major, minor numbers][devices] for the device.
223
-
Unset values mean "all", mapping to [`*`in the filesystem API][cgroup-v1-devices].
223
+
Defaults to `*`, the semantics of which are documented [in the filesystem API][cgroup-v1-devices].
224
224
***`access`***(string, OPTIONAL)* - cgroup permissions for device.
225
225
A composition of `r` (read), `w` (write), and `m` (mknod).
226
226
@@ -348,7 +348,7 @@ The following parameters can be specified to set up the controller:
348
348
***`weight`***(uint16, OPTIONAL)* - bandwidth rate for the device.
349
349
***`leafWeight`***(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
350
350
351
-
You MUST specify at least one of `weight` or `leafWeight` in a given entry, and MAY specify both.
351
+
You MUST [set](glossary.md#set) at least one of `weight` or `leafWeight` in a given entry, and MAY [set](glossary.md#set) both.
352
352
353
353
***`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`***(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
354
354
The following parameters can be specified per-device:
@@ -466,17 +466,17 @@ The following parameters can be specified to set up the controller:
466
466
## <aname="configLinuxIntelRdt" />IntelRdt
467
467
468
468
**`intelRdt`** (object, OPTIONAL) represents the [Intel Resource Director Technology][intel-rdt-cat-kernel-interface].
469
-
If `intelRdt` is set, the runtime MUST write the container process ID to the `<container-id>/tasks` file in a mounted `resctrl` pseudo-filesystem, using the container ID from [`start`](runtime.md#start) and creating the `<container-id>` directory if necessary.
469
+
If `intelRdt` is [set](glossary.md#set), the runtime MUST write the container process ID to the `<container-id>/tasks` file in a mounted `resctrl` pseudo-filesystem, using the container ID from [`start`](runtime.md#start) and creating the `<container-id>` directory if necessary.
470
470
If no mounted `resctrl` pseudo-filesystem is available in the [runtime mount namespace](glossary.md#runtime-namespace), the runtime MUST [generate an error](runtime.md#errors).
471
471
472
-
If `intelRdt` is not set, the runtime MUST NOT manipulate any `resctrl` psuedo-filesystems.
472
+
If `intelRdt` is [unset](glossary.md#set), the runtime MUST NOT manipulate any `resctrl` psuedo-filesystems.
473
473
474
474
The following parameters can be specified for the container:
475
475
476
476
***`l3CacheSchema`***(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM).
477
-
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
477
+
If `l3CacheSchema` is [set](glossary.md#set), runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
478
478
479
-
If `l3CacheSchema` is not set, runtimes MUST NOT write to `schemata` files in any `resctrl` psuedo-filesystems.
479
+
If `l3CacheSchema` is [unset](glossary.md#set), runtimes MUST NOT write to `schemata` files in any `resctrl` psuedo-filesystems.
480
480
481
481
### Example
482
482
@@ -543,7 +543,7 @@ The following parameters can be specified to set up seccomp:
543
543
***`syscalls`***(array of objects, OPTIONAL)* - match a syscall in seccomp.
544
544
545
545
While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
546
-
For example, if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or unset, the kernel will kill the container process on its first syscall.
546
+
For example, if `defaultAction` is `SCMP_ACT_KILL` and `syscalls` is empty or [unset](glossary.md#set), the kernel will kill the container process on its first syscall.
Copy file name to clipboardExpand all lines: config-solaris.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,8 +87,8 @@ Mapped to `lower-link` in the [zonecfg(1M)][zonecfg.1m_2] man page.
87
87
If allowedAddress has not been specified, then they can use any IP address on the associated physical interface for the network resource.
88
88
Otherwise, when allowedAddress is specified, the container cannot use IP addresses that are not in the allowedAddress list for the physical address.
89
89
Mapped to `allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page.
90
-
***`configureAllowedAddress`***(string, OPTIONAL)* If configureAllowedAddress is set to true, the addresses specified by allowedAddress are automatically configured on the interface each time the container starts.
91
-
When it is set to false, the allowedAddress will not be configured on container start.
90
+
***`configureAllowedAddress`***(string, OPTIONAL)* If `configureAllowedAddress` is `true`, the addresses specified by `allowedAddress` are automatically configured on the interface each time the container starts.
91
+
When it is `false`, the `allowedAddress` will not be configured on container start.
92
92
Mapped to `configure-allowed-address` in the [zonecfg(1M)][zonecfg.1m_2] man page.
93
93
***`defrouter`***(string, OPTIONAL)* The value for the OPTIONAL default router.
94
94
***`macAddress`***(string, OPTIONAL)* Set the VNIC's MAC addresses based on the specified value or keyword.
Copy file name to clipboardExpand all lines: config-windows.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,11 +142,15 @@ You can indicate that a container should be started in an a mode where disk flus
142
142
143
143
## <aname="configWindowsHyperV" />HyperV
144
144
145
-
`hyperv` is an OPTIONAL field of the Windows configuration. If present, the container MUST be run with Hyper-V isolation. If omitted, the container MUST be run as a Windows Server container.
145
+
`hyperv` is an OPTIONAL field of the Windows configuration.
146
+
If [set](glossary.md#set), the container MUST be run with Hyper-V isolation.
147
+
If [unset](glossary.md#set), the container MUST be run as a Windows Server container.
146
148
147
149
The following parameters can be specified:
148
150
149
-
***`utilityvmpath`***(string, OPTIONAL)* - specifies the path to the image used for the utility VM. This would be specified if using a base image which does not contain a utility VM image. If not supplied, the runtime will search the container filesystem layers from the bottom-most layer upwards, until it locates "UtilityVM", and default to that path.
151
+
***`utilityvmpath`***(string, OPTIONAL)* - specifies the path to the image used for the utility VM.
152
+
This would be specified if using a base image which does not contain a utility VM image.
153
+
If [unset](glossary.md#set), the runtime MUST search the container filesystem layers from the bottom-most layer upwards, until it locates "UtilityVM", and default to that path.
Copy file name to clipboardExpand all lines: config.md
+12-9Lines changed: 12 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,14 +31,17 @@ For example, if a configuration is compliant with version 1.1 of this specificat
31
31
***`path`** (string, OPTIONAL) Specifies the path to the root filesystem for the container. The path is either an absolute path or a relative path to the bundle.
32
32
Users SHOULD consider using a conventional name, such as `rootfs`.
33
33
34
-
On Windows, for Windows Server Containers, this field is REQUIRED and MUST be specified as a [volume GUID path][naming-a-volume]. For Hyper-V Containers, this field MUST be omitted.
34
+
On Windows, for Windows Server Containers, this field is REQUIRED and MUST be a [volume GUID path][naming-a-volume].
35
+
For Hyper-V Containers, this field MUST be [unset](glossary.md#set).
35
36
36
37
On all other platforms, this field is REQUIRED.
37
38
38
39
On Linux, for example, with a bundle at `/to/bundle` and a root filesystem at `/to/bundle/rootfs`, the `path` value can be either `/to/bundle/rootfs` or `rootfs`.
39
40
40
41
If defined, a directory MUST exist at the path declared by the field.
41
-
***`readonly`** (bool, OPTIONAL) If true then the root filesystem MUST be read-only inside the container, defaults to false. On Windows, this field must be omitted or false.
42
+
***`readonly`** (bool, OPTIONAL) If `true`, then the root filesystem MUST be read-only inside the container.
43
+
Defaults to false.
44
+
On Windows, this field MUST be [unset](glossary.md#set) or `false`.
42
45
43
46
### Example (POSIX)
44
47
@@ -163,13 +166,13 @@ For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M
163
166
***`noNewPrivileges`** (bool, OPTIONAL) setting `noNewPrivileges` to true prevents the processes in the container from gaining additional privileges.
164
167
As an example, the ['no_new_privs'][no-new-privs] article in the kernel documentation has information on how this is achieved using a prctl system call on Linux.
165
168
166
-
For Linux-based systems the process structure supports the following process-specific fields.
169
+
For Linux-based systems, the `process` structure also contains:
167
170
168
171
***`apparmorProfile`** (string, OPTIONAL) specifies the name of the AppArmor profile to be applied to processes in the container.
169
172
For more information about AppArmor, see [AppArmor documentation][apparmor].
170
173
***`oomScoreAdj`***(int, OPTIONAL)* adjusts the oom-killer score in `[pid]/oom_score_adj` for the container process's `[pid]` in a [proc pseudo-filesystem][procfs].
171
-
If `oomScoreAdj` is set, the runtime MUST set `oom_score_adj` to the given value.
172
-
If `oomScoreAdj` is not set, the runtime MUST NOT change the value of `oom_score_adj`.
174
+
If `oomScoreAdj` is [set](glossary.md#set), the runtime MUST set `oom_score_adj` to the given value.
175
+
If `oomScoreAdj` is [unset](glossary.md#set), the runtime MUST NOT change the value of `oom_score_adj`.
173
176
174
177
This is a per-process setting, where as [`disableOOMKiller`](config-linux.md#disable-out-of-memory-killer) is scoped for a memory cgroup.
175
178
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory_2].
@@ -338,11 +341,11 @@ For Windows based systems the user structure has the following fields:
338
341
Runtime implementations MAY support any valid values for platform-specific fields as part of this configuration.
0 commit comments