From 0bdeae6cdcca8c440cd8bcb5f4ccdd14161aba21 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 31 May 2017 15:49:12 -0700 Subject: [PATCH 1/2] config: Remove incorrect "after the container namespaces are created" Not all hooks are run after creation. In fact, there are currently no postcreate hooks (prestart hooks are called "after the start operation is called but before the user-specified program command is executed". Fixing 28e8f68 (Hooks to linux,solaris and doc clarification, 2017-05-24, #855), which pulled the broken line in from a Go comment [1]. [1]: https://github.com/opencontainers/runtime-spec/pull/855#discussion_r118341546 Signed-off-by: W. Trevor King --- config.md | 1 - 1 file changed, 1 deletion(-) diff --git a/config.md b/config.md index 4fa7578bd..c970e618f 100644 --- a/config.md +++ b/config.md @@ -365,7 +365,6 @@ Runtime implementations MAY support any valid values for platform-specific field ## Hooks Hooks allow for the configuration of custom actions related to the [lifecycle](runtime.md#lifecycle) of the container if supported by the platform. -On Linux, they are run after the container namespaces are created. * **`hooks`** (object, OPTIONAL) MAY contain any of the following properties: * **`prestart`** (array of objects, OPTIONAL) is an array of [pre-start hooks](#prestart). From 1a6cb18db1a6d9de155a60fa9be792f45821ee20 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 31 May 2017 15:54:45 -0700 Subject: [PATCH 2/2] config: Require hook support on Linux and Solaris Clarifying the language from 28e8f68 (Hooks to linux,solaris and doc clarification, 2017-05-24, #855), which did not say which platforms support hooks and which don't. Without something like this commit, there's no clear way for config authors to know if their runtime will support hooks or not, and there was previous agreement that that sort of ambiguity was not helpful [1]. This also gives normative Markdown grounding for the Go platform tag added in 28e8f68. [1]: https://github.com/opencontainers/runtime-spec/pull/472#r78088802 Signed-off-by: W. Trevor King --- config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.md b/config.md index c970e618f..3cdea5f9e 100644 --- a/config.md +++ b/config.md @@ -362,9 +362,9 @@ Runtime implementations MAY support any valid values for platform-specific field } ``` -## Hooks +## Linux and Solaris Hooks -Hooks allow for the configuration of custom actions related to the [lifecycle](runtime.md#lifecycle) of the container if supported by the platform. +For Linux- and Solaris-based systems, the configuration structure supports `hooks` for configuring custom actions related to the [lifecycle](runtime.md#lifecycle) of the container. * **`hooks`** (object, OPTIONAL) MAY contain any of the following properties: * **`prestart`** (array of objects, OPTIONAL) is an array of [pre-start hooks](#prestart).