diff --git a/config.md b/config.md index b9b55737c..a38dceaa3 100644 --- a/config.md +++ b/config.md @@ -634,7 +634,8 @@ The `poststart` hooks MUST be executed in the [runtime namespace](glossary.md#ru ### 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). diff --git a/runtime.md b/runtime.md index d3aaa9b14..870a3a272 100644 --- a/runtime.md +++ b/runtime.md @@ -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. ## Errors