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

Add hooks order explanation in runtime.md #156

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,15 @@ The pre-start hooks are called after the container process is spawned, but befor
They are called after the container namespaces are created on Linux, so they provide an opportunity to customize the container.
In Linux, for e.g., the network namespace could be configured in this hook.

The hooks MUST be called in the listed order (`Prestart[0]` first, `Prestart[1]` second, …).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSON key is prestart, not Prestart. And @vbatts feels like the parenthetical may be too much (at least for #142).

If a hook returns a non-zero exit code, then an error including the exit code and the stderr is returned to the caller and the container is torn down.



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably leave these blank-line insertions out ;).

### Post-stop
The post-stop hooks are called after the container process is stopped. Cleanup or debugging could be performed in such a hook.

The hooks MUST be called in the listed order (`Poststop[0]` first, `Poststop[1]` second, …).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSON key is poststop, not Poststop.

If a hook returns a non-zero exit code, then an error is logged and the remaining hooks are executed.

*Example*
Expand Down