From 6f0c1c806fe83e5e17a861b81a50855fbf0cdf46 Mon Sep 17 00:00:00 2001 From: hc-github-team-nomad-core <82989552+hc-github-team-nomad-core@users.noreply.github.com> Date: Mon, 8 Jan 2024 05:07:25 -0600 Subject: [PATCH] backport of commit 6bbd3b0cecfc2c6b889a7d327102e9f029301df1 (#19655) Co-authored-by: Shantanu Gadgil --- .../content/docs/job-specification/group.mdx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/website/content/docs/job-specification/group.mdx b/website/content/docs/job-specification/group.mdx index 98024164e2f..364577c081b 100644 --- a/website/content/docs/job-specification/group.mdx +++ b/website/content/docs/job-specification/group.mdx @@ -63,14 +63,14 @@ job "docs" { rescheduling strategy. Nomad will then attempt to schedule the task on another node if any of the group allocation statuses become "failed". -- `prevent_reschedule_on_lost` `(bool: false)` - Defines the reschedule behaviour - of an allocation when the node it is running on misses heartbeats. - When enabled, if the node it is running on becomes disconnected +- `prevent_reschedule_on_lost` `(bool: false)` - Defines the reschedule behaviour + of an allocation when the node it is running on misses heartbeats. + When enabled, if the node it is running on becomes disconnected or goes down, this allocations wont be rescheduled and will show up as `unknown` - until the node comes back up or it is manually restarted. - + until the node comes back up or it is manually restarted. + This behaviour will only modify the reschedule process on the server. - To modify the allocation behaviour on the client, see + To modify the allocation behaviour on the client, see [`stop_after_client_disconnect`](#stop_after_client_disconnect). The `unknown` allocation has to be manually stopped to run it again. @@ -79,7 +79,7 @@ job "docs" { `nomad alloc stop ` ``` - Setting `max_client_disconnect` and `prevent_reschedule_on_lost = true` at the + Setting `max_client_disconnect` and `prevent_reschedule_on_lost = true` at the same time requires that [rescheduling is disabled entirely][`disable_rescheduling`]. - `restart` ([Restart][]: nil) - Specifies the restart policy for @@ -344,31 +344,31 @@ group "second" { #### Max Client Disconnect and Prevent Reschedule On Lost -Setting `max_client_disconnect` and `prevent_reschedule_on_lost = true` at the +Setting `max_client_disconnect` and `prevent_reschedule_on_lost = true` at the same time requires that [rescheduling is disabled entirely][`disable_rescheduling`]. ```hcl # jobspec.nomad group "first" { - max_client_disconnect = "12h" + max_client_disconnect = "12h" prevent_reschedule_on_lost = true - task "first-task" { - reschedule { - attempts = 0 - unlimited = false - } + reschedule { + attempts = 0 + unlimited = false + } + task "first-task" { ... } } ``` -If [`max_client_disconnect`](#max_client_disconnect) is set and +If [`max_client_disconnect`](#max_client_disconnect) is set and `prevent_reschedule_on_lost = true`, allocations on disconnected nodes will be -`unknown` until the `max_client_disconnect` window expires, at which point -the node will be transition from `disconnected` to `down`. The allocation +`unknown` until the `max_client_disconnect` window expires, at which point +the node will be transition from `disconnected` to `down`. The allocation will remain as `unknown` and won't be rescheduled.