diff --git a/content/nomad/v1.11.x/content/docs/job-specification/disconnect.mdx b/content/nomad/v1.11.x/content/docs/job-specification/disconnect.mdx index 29c6b36ac2..4ff1d7faaf 100644 --- a/content/nomad/v1.11.x/content/docs/job-specification/disconnect.mdx +++ b/content/nomad/v1.11.x/content/docs/job-specification/disconnect.mdx @@ -26,7 +26,7 @@ job "docs" { group "example" { disconnect { lost_after = "6h" - replace = false + replace = true reconcile = "keep_original" } } @@ -34,7 +34,7 @@ job "docs" { group "example2" { disconnect { stop_on_client_after = "12h" - replace = false + replace = true reconcile = "keep_original" } } @@ -48,20 +48,21 @@ same `disconnect` block. - `lost_after` `(string: "")` - Specifies a duration during which a Nomad client will attempt to reconnect allocations after it fails to heartbeat in the - [`heartbeat_grace`][] window. It defaults to "", which is equivalent to - having the disconnect block be nil. - - You cannot use `lost_after` and `stop_on_client_after` in the same - `disconnect` block. + [`heartbeat_grace`][] window. Allocations with a `lost_after` > 0s are put into + an `unknown` state until they reconnect or the `lost_after` expires. + It defaults to "", which is equivalent to a `lost_after` of `"0s"` where + allocations will immediately be marked lost. Refer to [the Lost After section][lost-after] for more details. - `replace` `(bool: true)` - Specifies if Nomad should replace the disconnected - allocation with a new one rescheduled on a different node. Nomad considers the - replacement allocation a reschedule and obeys the job's [`reschedule`][] - block. If false and the node the allocation is running on disconnects - or goes down, Nomad does not replace this allocation and reports `unknown` - until the node reconnects, or until you manually stop the allocation. + (i.e. `unknown`) allocation with a new one rescheduled on a different node. + Nomad considers the replacement allocation a reschedule and obeys the job's + [`reschedule`][] block. If false, Nomad does not replace the allocation + when the node it's running on disconnects or goes down. + + Note: The `replace` field is only relevant for behavior when `lost_after` + is used and the allocation is in the `unknown` state. ```plaintext `nomad alloc stop ` @@ -71,10 +72,7 @@ same `disconnect` block. disconnected. - `stop_on_client_after` `(string: "")` - Specifies a duration after which a - disconnected Nomad client will stop its allocations. Setting - `stop_on_client_after` shorter than `lost_after` and `replace = false` at the - same time is not permitted and will cause a validation error, because this - would lead to a state where no allocations can be scheduled. + disconnected Nomad client will stop its allocations. The Nomad client process must be running for this to occur. diff --git a/content/nomad/v1.11.x/content/docs/job-specification/migrate.mdx b/content/nomad/v1.11.x/content/docs/job-specification/migrate.mdx index 2e9574936e..a64c4315ab 100644 --- a/content/nomad/v1.11.x/content/docs/job-specification/migrate.mdx +++ b/content/nomad/v1.11.x/content/docs/job-specification/migrate.mdx @@ -84,6 +84,6 @@ on node draining. [count]: /nomad/docs/job-specification/group#count [drain]: /nomad/commands/node/drain [deadline]: /nomad/commands/node/drain#deadline -[replaces]: /nomad/docs/job-specification/disconnect#replace +[replaces]: /nomad/docs/job-specification/disconnect [`restart`]: /nomad/docs/job-specification/restart [reschedules]: /nomad/docs/job-specification/reschedule diff --git a/content/nomad/v1.11.x/content/docs/job-specification/reschedule.mdx b/content/nomad/v1.11.x/content/docs/job-specification/reschedule.mdx index d4dfe5784d..9ae3d2f68c 100644 --- a/content/nomad/v1.11.x/content/docs/job-specification/reschedule.mdx +++ b/content/nomad/v1.11.x/content/docs/job-specification/reschedule.mdx @@ -139,5 +139,5 @@ job "docs" { [`progress_deadline`]: /nomad/docs/job-specification/update#progress_deadline [`restart`]: /nomad/docs/job-specification/restart [migrates]: /nomad/docs/job-specification/migrate -[replaces]: /nomad/docs/job-specification/disconnect#replace +[replaces]: /nomad/docs/job-specification/disconnect [reschedules]: /nomad/docs/job-specification/reschedule