Commit 3d50c471 authored by Alex Dadgar's avatar Alex Dadgar
Browse files

small review feedback fixes

parent 7df7a6fd
No related merge requests found
Showing with 9 additions and 7 deletions
+9 -7
......@@ -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
......
......@@ -2493,7 +2493,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
......@@ -5416,11 +5416,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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment