Skip to content

Commit 8bda028

Browse files
author
Aaron Lehmann
committed
updater: Check entire service spec when deciding whether to replace ongoing 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 <aaron.lehmann@docker.com>
1 parent 27fbaef commit 8bda028

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manager/orchestrator/updater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (u *UpdateSupervisor) Update(ctx context.Context, cluster *api.Cluster, ser
4949
id := service.ID
5050

5151
if update, ok := u.updates[id]; ok {
52-
if !update.isServiceDirty(service) {
52+
if reflect.DeepEqual(service.Spec, update.newService.Spec) {
5353
// There's already an update working towards this goal.
5454
return
5555
}

0 commit comments

Comments
 (0)