1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #25189 from aaronlehmann/service-list-counter

service ls: Show tasks from nodes that are not down, not only "ready" nodes
This commit is contained in:
Sebastiaan van Stijn 2016-07-29 02:48:43 +02:00 committed by GitHub
commit 246d3cdb9a

View file

@ -84,7 +84,7 @@ func runList(dockerCli *client.DockerCli, opts listOptions) error {
func PrintNotQuiet(out io.Writer, services []swarm.Service, nodes []swarm.Node, tasks []swarm.Task) { func PrintNotQuiet(out io.Writer, services []swarm.Service, nodes []swarm.Node, tasks []swarm.Task) {
activeNodes := make(map[string]struct{}) activeNodes := make(map[string]struct{})
for _, n := range nodes { for _, n := range nodes {
if n.Status.State == swarm.NodeStateReady { if n.Status.State != swarm.NodeStateDown {
activeNodes[n.ID] = struct{}{} activeNodes[n.ID] = struct{}{}
} }
} }