Skip to content

Commit

Permalink
Update scheduler/reconcile.go
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Baker <1675087+cgbaker@users.noreply.github.com>
  • Loading branch information
Mahmood Ali and cgbaker committed Aug 25, 2020
1 parent 3a28b85 commit f075bcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scheduler/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f075bcc

Please sign in to comment.