Change the default mode for client side restarts to fail from delay

This commit is contained in:
Preetha Appan
2018-01-31 10:39:11 -06:00
parent e34731fd4e
commit ee5b39071e
2 changed files with 6 additions and 5 deletions

View File

@@ -2514,13 +2514,13 @@ var (
Delay: 15 * time.Second,
Attempts: 2,
Interval: 1 * time.Minute,
Mode: RestartPolicyModeDelay,
Mode: RestartPolicyModeFail,
}
defaultBatchJobRestartPolicy = RestartPolicy{
Delay: 15 * time.Second,
Attempts: 15,
Interval: 7 * 24 * time.Hour,
Mode: RestartPolicyModeDelay,
Mode: RestartPolicyModeFail,
}
)

View File

@@ -17,7 +17,8 @@ description: |-
</tr>
</table>
The `restart` stanza configures a group's behavior on task failure.
The `restart` stanza configures a group's behavior on task failure. Restarts
happen on the client that is running the task.
```hcl
job "docs" {
@@ -62,7 +63,7 @@ defaults by job type:
attempts = 15
delay = "15s"
interval = "168h"
mode = "delay"
mode = "fail"
}
```
@@ -73,7 +74,7 @@ defaults by job type:
interval = "1m"
attempts = 2
delay = "15s"
mode = "delay"
mode = "fail"
}
```