Description
docker service ps for a service is supposed to group tasks together by slot, but global services don't have a slot. It looks here like the intention is that tasks running on the same node should get grouped together and historical tasks should get a \_ prefix so that they get indented under their other tasks on that same node:
https://github.com/docker/cli/blob/master/cli/command/task/print.go#L71
But this doesn't work because we sort tasks by slot:
https://github.com/docker/cli/blob/master/cli/command/task/print.go#L15
But global services' tasks don't have a slot.
Steps to reproduce the issue:
- Create a global service on multiple nodes
- Run
docker service ps on that node
- See that the service's tasks are not sorted by node
Description
docker service psfor a service is supposed to group tasks together by slot, but global services don't have a slot. It looks here like the intention is that tasks running on the same node should get grouped together and historical tasks should get a\_prefix so that they get indented under their other tasks on that same node:https://github.com/docker/cli/blob/master/cli/command/task/print.go#L71
But this doesn't work because we sort tasks by slot:
https://github.com/docker/cli/blob/master/cli/command/task/print.go#L15
But global services' tasks don't have a slot.
Steps to reproduce the issue:
docker service pson that node