Merge pull request #24125 from vdemeester/24117-node-task-filter

Fix --filter=desired_state behaviour
This commit is contained in:
Tibor Vass 2016-06-30 14:08:05 -07:00 committed by GitHub
commit 9d18fda08d

View file

@ -55,7 +55,7 @@ func runTasks(dockerCli *client.DockerCli, opts tasksOptions) error {
filter := opts.filter.Value()
filter.Add("node", node.ID)
if !opts.all {
if !opts.all && !filter.Include("desired_state") {
filter.Add("desired_state", string(swarm.TaskStateRunning))
filter.Add("desired_state", string(swarm.TaskStateAccepted))