Skip to content

Commit

Permalink
Reverts #6703
Browse files Browse the repository at this point in the history
This PR reverts changes introduced in #6703 that made changes to
affinities and spreads cause destructive updates.

#6988 outlines good reason to
rethink this until we have scheduler functionality in place that treats
and update to spread/affinity similar to how count changes are handled
(rebalancing the difference instead of rescheduling all allocs).
  • Loading branch information
drewbailey committed Feb 10, 2020
1 parent 4757f87 commit c497baf
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions scheduler/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,10 @@ func tasksUpdated(jobA, jobB *structs.Job, taskGroup string) bool {
return true
}

// TODO: check affinities and spreads
// for tasks updated, but do not necessarily
// reschedule or re-create them.
// Check Affinities
if affinitiesUpdated(jobA, jobB, taskGroup) {
return true
}

// Check Spreads
if spreadsUpdated(jobA, jobB, taskGroup) {
return true
}

// Check each task
for _, at := range a.Tasks {
Expand Down

0 comments on commit c497baf

Please sign in to comment.