Skip to content

Commit ccbc57f

Browse files
committed
runtime: Remove "features the runtime chooses to support"
Step 3 of the lifecycle from before this commit had two sentences which both landed in be59415 (Split create and start, 2016-04-01, #384). I pushed back a bit on the entry then [1,2], but we seem to be pretty comfortable with the current "keep all lifecyle entries in a one-layer enumerated list" approach, so I'm leaving that alone in this commit. Step 3 isn't really a lifecycle step though, it's more about clarifying that you can jump around in the lifecycle instead of hitting all the steps in consecutive order. I'd floated a new paragraph addressing that jumping, but was unable to form a consensus around wording, and the jumping is already somewhat covered by the current list entries (e.g. "The container process exits."). This commit just drops the old step 3, and Michael will follow up with wording about jumping [3]. The other sentence from the old step 3 doesn't need replacing, because the limits are already covered in more detail in the operation sections themselves. For example, the 'delete' operation has: Attempting to delete a container that does not exist MUST generate an error. Attempting to delete a container whose process is still running MUST generate an error. I don't see the need to call generic attention to that idea, and especially do not think that an entry in the lifecycle list is the right place for such a generic call-out. [1]: #384 (comment) [2]: #384 (comment) [3]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-05-10-21.03.log.html#l-79 Signed-off-by: W. Trevor King <[email protected]>
1 parent be3a184 commit ccbc57f

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

runtime.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ The value MAY be one of:
1818

1919
* `creating`: the container is being created (step 2 in the [lifecycle](#lifecycle))
2020
* `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 program
21-
* `running`: the container process has executed the user-specified program but has not exited (after step 4 in the [lifecycle](#lifecycle))
22-
* `stopped`: the container process has exited (step 5 in the [lifecycle](#lifecycle))
21+
* `running`: the container process has executed the user-specified program but has not exited (after step 5 in the [lifecycle](#lifecycle))
22+
* `stopped`: the container process has exited (step 7 in the [lifecycle](#lifecycle))
2323

2424
Additional values MAY be defined by the runtime, however, they MUST be used to represent new runtime states not defined above.
2525
* **`pid`** (int, REQUIRED when `status` is `created` or `running`) is the ID of the container process, as seen by the host.
@@ -55,19 +55,17 @@ The lifecycle describes the timeline of events that happen from when a container
5555
If the runtime is unable to create the environment specified in the [`config.json`](config.md), it MUST [generate an error](#errors).
5656
While the resources requested in the [`config.json`](config.md) MUST be created, the user-specified program (from [`process`](config.md#process)) MUST NOT be run at this time.
5757
Any updates to [`config.json`](config.md) after this step MUST NOT affect the container.
58-
3. Once the container is created additional actions MAY be performed based on the features the runtime chooses to support.
59-
However, some actions might only be available based on the current state of the container (e.g. only available while it is started).
60-
4. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container.
61-
5. The [prestart hooks](config.md#prestart) MUST be invoked by the runtime.
62-
If any prestart hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 10.
63-
6. The runtime MUST run the user-specified program, as specified by [`process`](config.md#process).
64-
7. The [poststart hooks](config.md#poststart) MUST be invoked by the runtime.
58+
3. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container.
59+
4. The [prestart hooks](config.md#prestart) MUST be invoked by the runtime.
60+
If any prestart hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 9.
61+
5. The runtime MUST run the user-specified program, as specified by [`process`](config.md#process).
62+
6. The [poststart hooks](config.md#poststart) MUST be invoked by the runtime.
6563
If any poststart hook fails, the runtime MUST [log a warning](#warnings), but the remaining hooks and lifecycle continue as if the hook had succeeded.
66-
8. The container process exits.
64+
7. The container process exits.
6765
This MAY happen due to erroring out, exiting, crashing or the runtime's [`kill`](runtime.md#kill) operation being invoked.
68-
9. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
69-
10. The container MUST be destroyed by undoing the steps performed during create phase (step 2).
70-
11. The [poststop hooks](config.md#poststop) MUST be invoked by the runtime.
66+
8. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container.
67+
9. The container MUST be destroyed by undoing the steps performed during create phase (step 2).
68+
10. The [poststop hooks](config.md#poststop) MUST be invoked by the runtime.
7169
If any poststop hook fails, the runtime MUST [log a warning](#warnings), but the remaining hooks and lifecycle continue as if the hook had succeeded.
7270

7371
## <a name="runtimeErrors" />Errors

0 commit comments

Comments
 (0)