Skip to content
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

runtime: fail when a poststop hook fails #1265

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,8 @@ The `poststart` hooks MUST be executed in the [runtime namespace](glossary.md#ru

### <a name="configHooksPoststop" />Poststop

The `poststop` hooks MUST be called [after the container is deleted](runtime.md#lifecycle) but before the [`delete`](runtime.md#delete) operation returns.
The `poststop` hooks MUST be called [after the user-specified process is killed](runtime.md#lifecycle), but before the [`delete`](runtime.md#delete) operation return.
Runtime should make sure that if a `poststop` hook failed, the [`delete`](runtime.md#delete) operation could fail and be retried.
Cleanup or debugging functions are examples of such a hook.

The `poststop` hooks' path MUST resolve in the [runtime namespace](glossary.md#runtime-namespace).
Expand Down
2 changes: 1 addition & 1 deletion runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The lifecycle describes the timeline of events that happen from when a container
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.
If any `poststop` hook fails, the runtime MUST [generate an error](#errors), so that the Runtime's [`delete`](runtime.md#delete) command fails and retry is required until all `poststop` hooks succeed.

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

Expand Down
Loading