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
@@ -335,7 +335,7 @@ The following parameters can be specified to set up the controller:
335
335
***`weight`***(uint16, OPTIONAL)* - bandwidth rate for the device.
336
336
***`leafWeight`***(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
337
337
338
-
You MUST specify at least one of `weight` or `leafWeight` in a given entry, and MAY specify both.
338
+
You MUST [set](glossary.md#set) at least one of `weight` or `leafWeight` in a given entry, and MAY [set](glossary.md#set) both.
339
339
340
340
***`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`***(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
341
341
The following parameters can be specified per-device:
@@ -451,17 +451,17 @@ The following parameters can be specified to set up the controller:
451
451
## <aname="configLinuxIntelRdt" />IntelRdt
452
452
453
453
**`intelRdt`** (object, OPTIONAL) represents the [Intel Resource Director Technology][intel-rdt-cat-kernel-interface].
454
-
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.
454
+
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.
455
455
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).
456
456
457
-
If `intelRdt` is not set, the runtime MUST NOT manipulate any `resctrl` psuedo-filesystems.
457
+
If `intelRdt` is [unset](glossary.md#set), the runtime MUST NOT manipulate any `resctrl` psuedo-filesystems.
458
458
459
459
The following parameters can be specified for the container:
460
460
461
461
***`l3CacheSchema`***(string, OPTIONAL)* - specifies the schema for L3 cache id and capacity bitmask (CBM).
462
-
If `l3CacheSchema` is set, runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
462
+
If `l3CacheSchema` is [set](glossary.md#set), runtimes MUST write the value to the `schemata` file in the `<container-id>` directory discussed in `intelRdt`.
463
463
464
-
If `l3CacheSchema` is not set, runtimes MUST NOT write to `schemata` files in any `resctrl` psuedo-filesystems.
464
+
If `l3CacheSchema` is [unset](glossary.md#set), runtimes MUST NOT write to `schemata` files in any `resctrl` psuedo-filesystems.
465
465
466
466
### Example
467
467
@@ -528,7 +528,7 @@ The following parameters can be specified to set up seccomp:
528
528
***`syscalls`***(array of objects, OPTIONAL)* - match a syscall in seccomp.
529
529
530
530
While this property is OPTIONAL, some values of `defaultAction` are not useful without `syscalls` entries.
531
-
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.
531
+
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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,11 +84,11 @@ For additional information on properties, check the [zonecfg(1M)][zonecfg.1m_2]
84
84
***`lowerLink`***(string, OPTIONAL)* Specify the link over which the VNIC will be created.
85
85
Mapped to `lower-link` in the [zonecfg(1M)][zonecfg.1m_2] man page.
86
86
***`allowedAddress`***(string, OPTIONAL)* The set of IP addresses that the container can use might be constrained by specifying the `allowedAddress` property.
87
-
If `allowedAddress`has not been specified, then they can use any IP address on the associated physical interface for the network resource.
88
-
Otherwise, when `allowedAddress` is specified, the container cannot use IP addresses that are not in the `allowedAddress` list for the physical address.
87
+
If `allowedAddress`is [unset](glossary.md#set), then they can use any IP address on the associated physical interface for the network resource.
88
+
Otherwise, when `allowedAddress` is [set](glossary.md#set), 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
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,14 +155,14 @@ You can indicate that a container should be started in an a mode where disk flus
155
155
## <aname="configWindowsHyperV" />HyperV
156
156
157
157
`hyperv` is an OPTIONAL field of the Windows configuration.
158
-
If present, the container MUST be run with Hyper-V isolation.
159
-
If omitted, the container MUST be run as a Windows Server container.
158
+
If [set](glossary.md#set), the container MUST be run with Hyper-V isolation.
159
+
If [unset](glossary.md#set), the container MUST be run as a Windows Server container.
160
160
161
161
The following parameters can be specified:
162
162
163
163
***`utilityVMPath`***(string, OPTIONAL)* - specifies the path to the image used for the utility VM.
164
164
This would be specified if using a base image which does not contain a utility VM image.
165
-
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.
165
+
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
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,14 +32,15 @@ For all platform-specific configuration values, the scope defined below in the [
32
32
The path is either an absolute path or a relative path to the bundle.
33
33
Users SHOULD consider using a conventional name, such as `rootfs`.
34
34
35
-
* On Windows, for Windows Server Containers, this field is REQUIRED and MUST be specified as a [volume GUID path][naming-a-volume].
36
-
For Hyper-V Containers, this field MUST be omitted.
35
+
* On Windows, for Windows Server Containers, this field is REQUIRED and MUST be a [volume GUID path][naming-a-volume].
36
+
For Hyper-V Containers, this field MUST be [unset](glossary.md#set).
37
37
* On all other platforms, this field is REQUIRED.
38
38
* 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
39
40
40
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.
42
-
* On Windows, this field MUST be omitted or false.
41
+
***`readonly`** (bool, OPTIONAL) If true then the root filesystem MUST be read-only inside the container.
42
+
Defaults to `false`.
43
+
* On Windows, this field MUST be [unset](glossary.md#set) or `false`.
43
44
44
45
### Example (POSIX)
45
46
@@ -173,8 +174,8 @@ For Linux-based systems the process structure supports the following process-spe
173
174
***`apparmorProfile`** (string, OPTIONAL) specifies the name of the AppArmor profile to be applied to processes in the container.
174
175
For more information about AppArmor, see [AppArmor documentation][apparmor].
175
176
***`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].
176
-
If `oomScoreAdj` is set, the runtime MUST set `oom_score_adj` to the given value.
177
-
If `oomScoreAdj` is not set, the runtime MUST NOT change the value of `oom_score_adj`.
177
+
If `oomScoreAdj` is [set](glossary.md#set), the runtime MUST set `oom_score_adj` to the given value.
178
+
If `oomScoreAdj` is [unset](glossary.md#set), the runtime MUST NOT change the value of `oom_score_adj`.
178
179
179
180
This is a per-process setting, where as [`disableOOMKiller`](config-linux.md#disable-out-of-memory-killer) is scoped for a memory cgroup.
180
181
For more information on how these two settings work together, see [the memory cgroup documentation section 10. OOM Contol][cgroup-v1-memory_2].
@@ -343,11 +344,11 @@ For Windows based systems the user structure has the following fields:
343
344
Runtime implementations MAY support any valid values for platform-specific fields as part of this configuration.
0 commit comments