Skip to content

Commit 70ee91c

Browse files
committed
runtime: Only require 'pid' in the state for created/running statuses
Because during creation (before 'created') we may not have a container process yet (e.g. if we're still reading the configuration or setting up cgroups), and in the 'stopped' phase the PID is no longer meaningful. Also add OPTIONAL/REQUIRED and remove colons for consistency with the config.md. Signed-off-by: W. Trevor King <[email protected]>
1 parent a059756 commit 70ee91c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

runtime.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,27 @@ Whether other entities using the same, or other, instance of the runtime can see
77

88
## State
99

10-
The state of a container MUST include, at least, the following properties:
10+
The state of a container includes the following properties:
1111

12-
* **`ociVersion`**: (string) is the OCI specification version used when creating the container.
13-
* **`id`**: (string) is the container's ID.
12+
* **`ociVersion`** (string, REQUIRED) is the OCI specification version used when creating the container.
13+
* **`id`** (string, REQUIRED) is the container's ID.
1414
This MUST be unique across all containers on this host.
1515
There is no requirement that it be unique across hosts.
16-
* **`status`**: (string) is the runtime state of the container.
16+
* **`status`** (string, REQUIRED) is the runtime state of the container.
1717
The value MAY be one of:
1818
* `created`: the container has been created but the user-specified program has not yet been executed
1919
* `running`: the container has been created and the user-specified program is running
2020
* `stopped`: the container has been created and the user-specified program has been executed but is no longer running
2121

2222
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
23-
* **`pid`**: (int) is the ID of the container process, as seen by the host.
24-
* **`bundlePath`**: (string) is the absolute path to the container's bundle directory.
23+
* **`pid`** (int, REQUIRED when `status` is `created` or `running`) is the ID of the container process, as seen by the host.
24+
* **`bundlePath`** (string, REQUIRED) is the absolute path to the container's bundle directory.
2525
This is provided so that consumers can find the container's configuration and root filesystem on the host.
26-
* **`annotations`**: (map) contains the list of annotations associated with the container.
26+
* **`annotations`** (map, OPTIONAL) contains the list of annotations associated with the container.
2727
If no annotations were provided then this property MAY either be absent or an empty map.
2828

29+
The state MAY include additional properties.
30+
2931
When serialized in JSON, the format MUST adhere to the following pattern:
3032

3133
```json

0 commit comments

Comments
 (0)