Skip to content

Commit

Permalink
updater: Check entire service spec when deciding whether to replace o…
Browse files Browse the repository at this point in the history
…ngoing update

Currently, updater checks isServiceDirty to decide whether an existing
update should be restarted. This only checks the task spec and the
endpoint spec, so it will ignore changes to fields like UpdateConfig.
For example, it's not possible to change just the parallelism while an
update is already in progress. Fix this by comparing the whole spec.

Signed-off-by: Aaron Lehmann <[email protected]>
  • Loading branch information
aaronlehmann committed Sep 6, 2016
1 parent 27fbaef commit 8bda028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/orchestrator/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (u *UpdateSupervisor) Update(ctx context.Context, cluster *api.Cluster, ser
id := service.ID

if update, ok := u.updates[id]; ok {
if !update.isServiceDirty(service) {
if reflect.DeepEqual(service.Spec, update.newService.Spec) {
// There's already an update working towards this goal.
return
}
Expand Down

0 comments on commit 8bda028

Please sign in to comment.