From ee5b39071ea160feab985941776bc04af2a8883e Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Wed, 31 Jan 2018 10:39:11 -0600 Subject: [PATCH] Change the default mode for client side restarts to fail from delay --- nomad/structs/structs.go | 4 ++-- website/source/docs/job-specification/restart.html.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 2a894d7a3..a3674c2fd 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -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, } ) diff --git a/website/source/docs/job-specification/restart.html.md b/website/source/docs/job-specification/restart.html.md index 13e694a40..967fd033b 100644 --- a/website/source/docs/job-specification/restart.html.md +++ b/website/source/docs/job-specification/restart.html.md @@ -17,7 +17,8 @@ description: |- -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" } ```