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
runtime: Only require 'pid' in the state for created/running statuses
Because during the 'creating' phase 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.
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: runtime.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,28 @@ Whether other entities using the same, or other, instance of the runtime can see
7
7
8
8
## State
9
9
10
-
The state of a container MUST include, at least, the following properties:
10
+
The state of a container includes the following properties:
11
11
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.
14
14
This MUST be unique across all containers on this host.
15
15
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.
17
17
The value MAY be one of:
18
18
*`creating` : the container is being created (step 2 in the [lifecycle](#lifecycle))
19
19
*`created` : the runtime has finished the [create operation](#create) (after step 2 in the [lifecycle](#lifecycle)), and the container process has neither exited nor executed the user-specified code
20
20
*`running` : the container process has executed the user-specified code but has not exited (after step 4 in the [lifecycle](#lifecycle))
21
21
*`stopped` : the container process has exited (step 5 in the [lifecycle](#lifecycle))
22
22
23
23
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
24
-
***`pid`**: (int) is the ID of the main process within the container, as seen by the host.
25
-
***`bundlePath`**: (string) is the absolute path to the container's bundle directory.
24
+
***`pid`** (int, required when `status` is `created` or `running`) is the ID of the main process within the container, as seen by the host.
25
+
***`bundlePath`**: (string, required) is the absolute path to the container's bundle directory.
26
26
This is provided so that consumers can find the container's configuration and root filesystem on the host.
27
-
***`annotations`**: (map) contains the list of annotations associated with the container.
27
+
***`annotations`**: (map, required) contains the list of annotations associated with the container.
28
28
If no annotations were provided then this property MAY either be absent or an empty map.
29
29
30
+
The state MAY include additional properties.
31
+
30
32
When serialized in JSON, the format MUST adhere to the following pattern:
0 commit comments