mirror of https://github.com/docker/cli.git
progress: Show progress of replicated tasks before they are assigned
This was only showing tasks that belong to nodes that are currently up, so that tasks on down nodes don't appear to be stuck. But this unintentionally excludes tasks that haven't been assigned yet, so if a task is stuck before assignment, for example because no nodes meet its constraints, a progress bar won't even be shown. The check should only apply to tasks that have a node assignment. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
4c224a7786
commit
d3d09f67b1
|
@ -275,9 +275,13 @@ func (u *replicatedProgressUpdater) update(service swarm.Service, tasks []swarm.
|
|||
continue
|
||||
}
|
||||
}
|
||||
if task.NodeID != "" {
|
||||
if _, nodeActive := activeNodes[task.NodeID]; nodeActive {
|
||||
tasksBySlot[task.Slot] = task
|
||||
}
|
||||
} else {
|
||||
tasksBySlot[task.Slot] = task
|
||||
}
|
||||
}
|
||||
|
||||
// If we had reached a converged state, check if we are still converged.
|
||||
|
|
Loading…
Reference in New Issue