Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
b77f2602
Unverified
Commit
b77f2602
authored
7 years ago
by
Preetha Appan
Browse files
Options
Download
Email Patches
Plain Diff
Replace linear with constant, and other small changes
parent
8f208055
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
website/source/docs/job-specification/reschedule.html.md
+22
-23
website/source/docs/job-specification/reschedule.html.md
with
22 additions
and
23 deletions
+22
-23
website/source/docs/job-specification/reschedule.html.md
+
22
-
23
View file @
b77f2602
...
...
@@ -4,8 +4,7 @@ page_title: "reschedule Stanza - Job Specification"
sidebar_current
:
"
docs-job-specification-reschedule"
description
:
|-
The "reschedule" stanza specifies the group's rescheduling strategy upon
allocation failures. The reschedule strategy can be configured with options
described below. Nomad will only attempt to reschedule failed allocations on
allocation failures. Nomad will only attempt to reschedule failed allocations on
to another node only after any local [restarts](docs/job-specification/restart.html)
have been exceeded.
---
...
...
@@ -37,12 +36,12 @@ that hasn't previously been used.
job
"docs"
{
group
"example"
{
reschedule
{
attempts
=
15
interval
=
"1hr"
delay
=
"30s"
delay_function
=
"exponential"
,
max_delay
=
"120s"
unlimited
=
false
attempts
=
15
interval
=
"1hr"
delay
=
"30s"
delay_function
=
"exponential"
max_delay
=
"120s"
unlimited
=
false
}
}
}
...
...
@@ -62,13 +61,13 @@ job "docs" {
number of reschedule happen within it. If more than
`attempts`
number of
failures happen with this interval, Nomad will not reschedule any more.
-
`delay`
`(string:
"5s"
)`
- Specifies the duration to wait before attempting
-
`delay`
`(string:
<varies>
)`
- Specifies the duration to wait before attempting
to reschedule a failed task. This is specified using a label suffix like "30s" or "1h".
-
`delay_function`
`(string: <varies>)`
- Specifies the function according to which
the initial delay specified in
`delay`
changes.
`delay_function`
has three possible
values which are described below.
-
`
linear
`
- The delay between reschedule attempts stays constant at the
`delay`
value
defined above
.
-
`
constant
`
- The delay between reschedule attempts stays constant at the
`delay`
value.
-
`exponential`
- The delay between reschedule attempts doubles until it reaches a specified
`max_delay`
value.
-
`fibonacci`
- The delay between reschedule attempts is calculated by adding the two most recent
...
...
@@ -76,7 +75,7 @@ job "docs" {
delayed by 5 seconds, 5 seconds, 10 seconds, 15 seconds, and 25 seconds respectively.
-
`max_delay`
`(string: <varies>)`
- is an upper bound on the delay beyond which it will not increase. This parameter
is used when
`delay_function`
is
`exponential`
or
`fibonacci`
, and is ignored when
`
linear
`
delay is used.
is used when
`delay_function`
is
`exponential`
or
`fibonacci`
, and is ignored when
`
constant
`
delay is used.
-
`unlimited`
`(boolean:<varies>)`
-
`unlimited`
enables unlimited reschedule attempts. If this is set to true
the
`attempts`
and
`interval`
fields are not used.
...
...
@@ -94,23 +93,23 @@ defaults by job type:
```hcl
reschedule {
attempts = 1
interval = "24h"
unlimited = false
delay = "5s"
delay_function = "
linear
"
attempts
= 1
interval
= "24h"
unlimited
= false
delay
= "5s"
delay_function = "
constant
"
}
```
-
The Default Service Reschedule Policy is:
```hcl
reschedule {
delay = "30s"
delay_function = "exponential"
max_delay = "1hr"
unlimited = true
}
reschedule {
delay
= "30s"
delay_function = "exponential"
max_delay
= "1hr"
unlimited
= true
}
```
### Rescheduling during deployments
...
...
@@ -127,7 +126,7 @@ To disable rescheduling, set the `attempts` parameter to zero and `unlimited` to
job "docs" {
group "example" {
reschedule {
attempts
=
0
attempts
= 0
unlimited = false
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment