From 26dc560ab065060c0d0bcc19de1e79a8c4d64faa Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 25 Aug 2020 17:33:15 -0400 Subject: [PATCH] Update scheduler/reconcile.go Co-authored-by: Chris Baker <1675087+cgbaker@users.noreply.github.com> --- scheduler/reconcile.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheduler/reconcile.go b/scheduler/reconcile.go index b906c6c9bbbd..029fe3b31240 100644 --- a/scheduler/reconcile.go +++ b/scheduler/reconcile.go @@ -426,7 +426,8 @@ func (a *allocReconciler) computeGroup(group string, all allocSet) bool { // desired means we need to create canaries strategy := tg.Update canariesPromoted := dstate != nil && dstate.Promoted - requireCanary := (len(destructive) != 0 || (len(untainted) == 0 && len(migrate)+len(lost) != 0)) && + replaceAllAllocs := len(untainted) == 0 && len(migrate)+len(lost) != 0 + requireCanary := (len(destructive) != 0 || replaceAllAllocs) && strategy != nil && len(canaries) < strategy.Canary && !canariesPromoted if requireCanary { dstate.DesiredCanaries = strategy.Canary