diff --git a/nomad/deploymentwatcher/deployment_watcher.go b/nomad/deploymentwatcher/deployment_watcher.go index fc9bebb2c..a62ebdfec 100644 --- a/nomad/deploymentwatcher/deployment_watcher.go +++ b/nomad/deploymentwatcher/deployment_watcher.go @@ -345,11 +345,13 @@ func (w *deploymentWatcher) StopWatch() { // watch is the long running watcher that watches for both allocation and // deployment changes. Its function is to create evaluations to trigger the // scheduler when more progress can be made, to fail the deployment if it has -// failed and potentially rolling back the job. +// failed and potentially rolling back the job. Progress can be made when an +// allocation transistions to healthy, so we create an eval. func (w *deploymentWatcher) watch() { // Get the deadline. This is likely a zero time to begin with but we need to // handle the case that the deployment has already progressed and we are now - // just starting to watch it. + // just starting to watch it. This must likely would occur if there was a + // leader transistion and we are now starting our watcher. currentDeadline := getDeploymentProgressCutoff(w.getDeployment()) var deadlineTimer *time.Timer if currentDeadline.IsZero() { @@ -373,7 +375,7 @@ FAIL: return case <-deadlineTimer.C: // We have hit the progress deadline so fail the deployment. We need - // to determine whether we should rollback the job by inspecting + // to determine whether we should roll back the job by inspecting // which allocs as part of the deployment are healthy and which // aren't. var err error diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index fa205593f..2bd32a4bc 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -2516,7 +2516,7 @@ type UpdateStrategy struct { HealthyDeadline time.Duration // ProgressDeadline is the time in which an allocation as part of the - // deployment must transistion to healthy. If no allocation becomes healthy + // deployment must transition to healthy. If no allocation becomes healthy // after the deadline, the deployment is marked as failed. If the deadline // is zero, the first failure causes the deployment to fail. ProgressDeadline time.Duration @@ -5469,11 +5469,11 @@ type DeploymentState struct { // reverted on failure AutoRevert bool - // ProgressDeadline is the deadline by which an allocation must transistion + // ProgressDeadline is the deadline by which an allocation must transition // to healthy before the deployment is considered failed. ProgressDeadline time.Duration - // RequireProgressBy is the time by which an allocation must transistion + // RequireProgressBy is the time by which an allocation must transition // to healthy before the deployment is considered failed. RequireProgressBy time.Time diff --git a/scheduler/reconcile.go b/scheduler/reconcile.go index 9cfaeddee..6308df011 100644 --- a/scheduler/reconcile.go +++ b/scheduler/reconcile.go @@ -197,7 +197,7 @@ func (a *allocReconciler) Compute() *reconcileResults { // XXX Fix // XXX An idea for not replacing failed allocs that are part of // deployment that will fail immediately is to only replace them if - // their desired transistion has a replace bool set by the deployment + // their desired transition has a replace bool set by the deployment // watcher. // Detect if any allocs associated with this deploy have failed