{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/24192","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/24192/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/24192/comments","events_url":"https://api.github.com/repos/docker/docker/issues/24192/events","html_url":"https://github.com/docker/docker/issues/24192","id":163259767,"number":24192,"title":"Service contraints not being honoured in a swarm","user":{"login":"hipposareevil","id":12662366,"avatar_url":"https://avatars.githubusercontent.com/u/12662366?v=3","gravatar_id":"","url":"https://api.github.com/users/hipposareevil","html_url":"https://github.com/hipposareevil","followers_url":"https://api.github.com/users/hipposareevil/followers","following_url":"https://api.github.com/users/hipposareevil/following{/other_user}","gists_url":"https://api.github.com/users/hipposareevil/gists{/gist_id}","starred_url":"https://api.github.com/users/hipposareevil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hipposareevil/subscriptions","organizations_url":"https://api.github.com/users/hipposareevil/orgs","repos_url":"https://api.github.com/users/hipposareevil/repos","events_url":"https://api.github.com/users/hipposareevil/events{/privacy}","received_events_url":"https://api.github.com/users/hipposareevil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/area/swarm","name":"area/swarm","color":"fbca04"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/53","html_url":"https://github.com/docker/docker/milestones/1.12.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/53/labels","id":1657301,"number":53,"title":"1.12.0","description":"feature/code freeze: June 14th, 2016","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":114,"closed_issues":533,"state":"open","created_at":"2016-03-21T13:47:53Z","updated_at":"2016-07-08T00:40:03Z","due_on":null,"closed_at":null},"comments":16,"created_at":"2016-06-30T20:28:31Z","updated_at":"2016-07-08T00:46:15Z","closed_at":"2016-07-08T00:26:10Z","body":"\r\n\r\n**Output of `docker version`:**\r\nClient:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:        Fri Jun 17 20:45:29 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:        Fri Jun 17 20:45:29 2016\r\n OS/Arch:      linux/amd64\r\n\r\n**Output of `docker info`:**\r\nContainers: 4\r\n Running: 3\r\n Paused: 0\r\n Stopped: 1\r\nImages: 7\r\nServer Version: 1.12.0-rc2\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 47\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: host null bridge overlay\r\nSwarm: active\r\n NodeID: 8ptf9fd6phpss2qy15a5c6frm\r\n IsManager: Yes\r\n Managers: 1\r\n Nodes: 3\r\n CACertHash: sha256:255d696a217a06801576ddf2a19f2b38487d007c6b470e545bf659e170a969ad\r\nRuntimes: default\r\nDefault Runtime: default\r\nSecurity Options: apparmor seccomp\r\nKernel Version: 4.4.0-28-generic\r\nOperating System: Ubuntu 16.04 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 32\r\nTotal Memory: 251.9 GiB\r\nName: xxxx\r\nID: ....\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nInstalled docker on fresh Ubuntu-16 baremetal boxes.\r\n\r\n\r\n**Steps to reproduce the issue:**\r\n1. On node 1 - create a swarm: swarm init\r\n2. On node 2 - update /etc/systemd/system/docker.service file with label:\r\nExecStart=/usr/local/bin/dockerd -H fd:// --label foo=\"bar\"\r\n3. On node 2 - Restart daemon\r\n4. On node 2 - verify label has taken: \r\n$ docker -D info\r\n....\r\nLabels:\r\n foo=bar\r\n....\r\n5. On node 2- join swarm: \r\n$ d swarm join XXX:2377\r\n6. On node 1- create service with constraint:\r\n$ docker service create --constraint foo=\"bar\" --name testconstraint --replicas 5 -p 8889:80 httpd:2.4\r\n\r\n\r\n\r\n**Describe the results you received:**\r\n7. On node 1- verify new service is running on node 1:\r\n$ docker ps\r\nCONTAINER ID        IMAGE                  COMMAND              CREATED              STATUS              PORTS                    NAMES\r\n7e52cca2ec86        httpd:2.4              \"httpd-foreground\"   About a minute ago   Up 58 seconds       80/tcp                   testconstraint.2.1t257nejusprq9toos441a1ah\r\n0f0d75d2057d        httpd:2.4              \"httpd-foreground\"   About a minute ago   Up 57 seconds       80/tcp                   testconstraint.4.2jujh8pg5pl2t3cgb0109kl33\r\n\r\n\r\n\r\n**Describe the results you expected:**\r\n\r\nI was expecting the service to only run on node 2, where the label was applied to the daemon.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\nI've tried this with variations of the label like:\r\n--constraint foo=bar, --constraint foo==bar\r\nwith no luck. Happens consistently.\r\n\r\nAm I creating the label in the engine incorrectly?\r\n\r\nthanks\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/231248047","html_url":"https://github.com/docker/docker/issues/24192#issuecomment-231248047","issue_url":"https://api.github.com/repos/docker/docker/issues/24192","id":231248047,"user":{"login":"dongluochen","id":14985073,"avatar_url":"https://avatars.githubusercontent.com/u/14985073?v=3","gravatar_id":"","url":"https://api.github.com/users/dongluochen","html_url":"https://github.com/dongluochen","followers_url":"https://api.github.com/users/dongluochen/followers","following_url":"https://api.github.com/users/dongluochen/following{/other_user}","gists_url":"https://api.github.com/users/dongluochen/gists{/gist_id}","starred_url":"https://api.github.com/users/dongluochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongluochen/subscriptions","organizations_url":"https://api.github.com/users/dongluochen/orgs","repos_url":"https://api.github.com/users/dongluochen/repos","events_url":"https://api.github.com/users/dongluochen/events{/privacy}","received_events_url":"https://api.github.com/users/dongluochen/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T00:46:15Z","updated_at":"2016-07-08T00:46:15Z","body":"@tiborvass #23312 doesn't fix this issue. We need to vendor [docker/swarmkit#893](https://github.com/docker/swarmkit/pull/893) and [docker/swarmkit#1114](https://github.com/docker/swarmkit/pull/1114). "}}
{"actor":{"display_login":"dongluochen"}}