Skip to content

Commit 50fa3f5

Browse files
pkazmierczaktgrossaimeeu
authored
docs: clarify relationship between max_parallel and canary for system jobs (#27075)
Co-authored-by: Tim Gross <[email protected]> Co-authored-by: Aimee Ukasick <[email protected]>
1 parent 68f51ff commit 50fa3f5

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

website/content/docs/job-specification/update.mdx

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,18 @@ job "docs" {
4141

4242
## Parameters
4343

44-
- `max_parallel` `(int: 1)` - Specifies the number of allocations within a task group that can be
45-
updated at the same time. The task groups themselves are updated in parallel.
44+
- `max_parallel` `(int: 1)` - Specifies the number of allocations within a task
45+
group that can be destructively updated at the same time. The task groups themselves are
46+
updated in parallel. In-place updates are performed all at once.
4647

47-
- `max_parallel = 0` - Specifies that the allocation should use forced updates instead of deployments
48+
- `max_parallel = 0` - Specifies that the allocation should use forced updates
49+
instead of deployments
50+
51+
~> **Note:** System jobs only support one allocation per node. When `canary`
52+
is set, system job updates make up to `max_parallel` destructive updates *or*
53+
destructively update enough allocations to place on `canary` percent of
54+
feasible nodes, whichever is lower. You should adjust the `max_parallel` value
55+
to allow deploying all desired canaries.
4856

4957
- `health_check` `(string: "checks")` - Specifies the mechanism in which
5058
allocations health is determined. The potential values are:
@@ -101,11 +109,20 @@ job "docs" {
101109
remaining allocations at a rate of `max_parallel`. Canary deployments cannot
102110
be used with volumes when `per_alloc = true`.
103111

104-
In system jobs, the `canary` setting indicates the percentage of eligible nodes to
105-
which allocations will be deployed. System jobs do not support more than one allocation
106-
per node, so effectively setting `canary` to a positive integer means this percentage of
107-
eligible nodes will get a new version of the job. Setting `canary` to 100 updates the job
108-
on all nodes. Percentage of nodes is always rounded up to the nearest integer.
112+
In system jobs, the `canary` setting indicates the percentage of feasible
113+
nodes to which Nomad makes destructive allocation updates. System jobs do
114+
not support more than one allocation per node, so effectively setting `canary`
115+
to a positive integer means this percentage of feasible nodes gets a new
116+
version of the job if the update is destructive. Non-destructive updates
117+
ignore the `canary` field. Setting `canary` to 100 updates the job on all
118+
nodes. Percentage of nodes is always rounded up to the nearest integer. If
119+
`canary` is set, nodes that register during a deployment do not receive
120+
placements until after the deployment is promoted.
121+
122+
~> **Note:** Updates when `canary` is set make up to `max_parallel`
123+
destructive updates *or* destructively update enough allocations to place on
124+
`canary` percent of feasible nodes, whichever is lower. You should adjust the
125+
`max_parallel` value to allow deploying all desired canaries.
109126

110127
- `stagger` `(string: "30s")` - Specifies the delay between each set of
111128
[`max_parallel`](#max_parallel) updates when updating system jobs. This

0 commit comments

Comments
 (0)