title: How do I filter docker swarm nodes by label?
body: <p>I'm running docker 1.12.1 and can't get node filtering by label to work.
  I first add the "test" label: </p>
  
  <pre><code>$ docker node update --label-add test mr-host
  mr-host
  </code></pre>
  
  <p>When I attempt to filter by it, no nodes are shown: </p>
  
  <pre><code>$ docker node ls --filter label=test
  ID  HOSTNAME  STATUS  AVAILABILITY  MANAGER STATUS
  </code></pre>
  
  <p>Filtering by other criteria such as name works fine:</p>
  
  <pre><code>$ docker node ls --filter name=mr-host
  ID                           HOSTNAME  STATUS  AVAILABILITY  MANAGER STATUS
  1c48m4msidbqwx7vj0lwib8ef *  mr-host   Ready   Active        Leader
  </code></pre>
  
  <p>The label is shown when I inspect the node:</p>
  
  <pre><code>$ docker node inspect mr-host
  [
      {
          "ID": "1c48m4msidbqwx7vj0lwib8ef",
          "Version": {
              "Index": 4865874
          },
          "CreatedAt": "2016-10-12T15:20:10.463286132Z",
          "UpdatedAt": "2016-10-13T16:29:03.113522485Z",
          "Spec": {
              "Labels": {
                  "test": ""
              },
              "Role": "manager",
              "Availability": "active"
          },
          "Description": {
              "Hostname": "mr-host",
              "Platform": {
                  "Architecture": "x86_64",
                  "OS": "linux"
              },
              "Resources": {
                  "NanoCPUs": 10000000000,
                  "MemoryBytes": 67548012544
              },
              "Engine": {
                  "EngineVersion": "1.12.1",
                  "Plugins": [
                      {
                          "Type": "Network",
                          "Name": "bridge"
                      },
                      {
                          "Type": "Network",
                          "Name": "host"
                      },
                      {
                          "Type": "Network",
                          "Name": "null"
                      },
                      {
                          "Type": "Network",
                          "Name": "overlay"
                      },
                      {
                          "Type": "Volume",
                          "Name": "local"
                      }
                  ]
              }
          },
          "Status": {
              "State": "ready"
          },
          "ManagerStatus": {
              "Leader": true,
              "Reachability": "reachable",
              "Addr": "192.168.0.118:2377"
          }
      }
  ]
  </code></pre>
  
  <p>What am I doing wrong? I'm pretty sure I've followed the documentation here correctly: <a href="https://docs.docker.com/engine/reference/commandline/node_ls/#/id" rel="noreferrer">https://docs.docker.com/engine/reference/commandline/node_ls/#/id</a></p>