-
Notifications
You must be signed in to change notification settings - Fork 575
Add create-runtime, create-container, start-container hooks #1008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,18 +55,24 @@ The lifecycle describes the timeline of events that happen from when a container | |
If the runtime is unable to create the environment specified in the [`config.json`](config.md), it MUST [generate an error](#errors). | ||
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. | ||
Any updates to [`config.json`](config.md) after this step MUST NOT affect the container. | ||
3. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container. | ||
4. The [prestart hooks](config.md#prestart) MUST be invoked by the runtime. | ||
If any prestart hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 9. | ||
5. The runtime MUST run the user-specified program, as specified by [`process`](config.md#process). | ||
6. The [poststart hooks](config.md#poststart) MUST be invoked by the runtime. | ||
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. | ||
7. The container process exits. | ||
3. The [`prestart` hooks](config.md#prestart) MUST be invoked by the runtime. | ||
If any `prestart` hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 12. | ||
4. The [`createRuntime` hooks](config.md#createRuntime-hooks) MUST be invoked by the runtime. | ||
If any `createRuntime` hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 12. | ||
5. The [`createContainer` hooks](config.md#createContainer-hooks) MUST be invoked by the runtime. | ||
If any `createContainer` hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 12. | ||
6. Runtime's [`start`](runtime.md#start) command is invoked with the unique identifier of the container. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realized this is something we probably don't want to specify. In case runtimes don't execute There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @h-vetinari I'm keeping this conversation open, If you have a specific idea it's probably worth discussing ! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's OK if |
||
7. The [`startContainer` hooks](config.md#startContainer-hooks) MUST be invoked by the runtime. | ||
If any `startContainer` hook fails, the runtime MUST [generate an error](#errors), stop the container, and continue the lifecycle at step 12. | ||
8. The runtime MUST run the user-specified program, as specified by [`process`](config.md#process). | ||
9. The [`poststart` hooks](config.md#poststart) MUST be invoked by the runtime. | ||
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. | ||
10. The container process exits. | ||
This MAY happen due to erroring out, exiting, crashing or the runtime's [`kill`](runtime.md#kill) operation being invoked. | ||
8. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container. | ||
9. The container MUST be destroyed by undoing the steps performed during create phase (step 2). | ||
10. The [poststop hooks](config.md#poststop) MUST be invoked by the runtime. | ||
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. | ||
11. Runtime's [`delete`](runtime.md#delete) command is invoked with the unique identifier of the container. | ||
12. The container MUST be destroyed by undoing the steps performed during create phase (step 2). | ||
13. The [`poststop` hooks](config.md#poststop) MUST be invoked by the runtime. | ||
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. | ||
|
||
## <a name="runtimeErrors" />Errors | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.