From bbd11fd9b52db412d913e94be58fdfff5737a860 Mon Sep 17 00:00:00 2001 From: Derek Strickland <1111455+DerekStrickland@users.noreply.github.com> Date: Wed, 29 Jun 2022 05:13:45 -0400 Subject: [PATCH] docs: update task leader to explain shutdown sequence. (#13498) * docs: update task leader to explain shutdown sequence. --- website/content/docs/job-specification/task.mdx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/content/docs/job-specification/task.mdx b/website/content/docs/job-specification/task.mdx index 97cd80e9b..d256c67c2 100644 --- a/website/content/docs/job-specification/task.mdx +++ b/website/content/docs/job-specification/task.mdx @@ -65,8 +65,13 @@ job "docs" { drivers). - `leader` `(bool: false)` - Specifies whether the task is the leader task of - the task group. If set to true, when the leader task completes, all other - tasks within the task group will be gracefully shutdown. + the task group. If set to `true`, when the leader task completes, all other + tasks within the task group will be gracefully shutdown. The shutdown + process starts by applying the `shutdown_delay` if configured. It then stops the + the leader task first, followed by non-sidecar and non-poststop tasks, + and finally sidecar tasks. Once this process completes, post-stop tasks + are triggered. See the [lifecycle][] documentation for a complete description + of task lifecycle management. - `lifecycle` ([Lifecycle][]: nil) - Specifies when a task is run within the lifecycle of a task group. Added in Nomad v0.11.