{"action":"opened","number":2202,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/2202","id":68688185,"html_url":"https://github.com/docker/swarm/pull/2202","diff_url":"https://github.com/docker/swarm/pull/2202.diff","patch_url":"https://github.com/docker/swarm/pull/2202.patch","issue_url":"https://api.github.com/repos/docker/swarm/issues/2202","number":2202,"state":"open","locked":false,"title":"change the way of producing engine label","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.githubusercontent.com/u/9465626?v=3","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"body":"Swarm has its way to construct engine labels. However docker daemon changes a little in its api.\r\nFor instance:\r\ndocker 1.10.3 has a field `ExecutionDriver` in `info` api:\r\nhttps://github.com/docker/docker/blob/v1.10.3/daemon/info.go#L88\r\nwhile, docker 1.11.0 has no field `ExecutionDriver` in `info` api:\r\nhttps://github.com/docker/docker/blob/v1.11.0/daemon/info.go#L70-L107\r\nAs a result, swarm should change a little in that case.\r\n\r\nAnd this PR did:\r\n1. validate label if it is empty;\r\n2. fix a typo when judging whether it is a label with key `node`\r\n3.when user-provided engine labels have overlap with swarm specific labels, send a warn log and override the latter ones \r\n\r\nSigned-off-by: Sun Hongliang <allen.sun@daocloud.io>","created_at":"2016-05-03T10:52:30Z","updated_at":"2016-05-03T10:52:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarm/pulls/2202/commits","review_comments_url":"https://api.github.com/repos/docker/swarm/pulls/2202/comments","review_comment_url":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarm/issues/2202/comments","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/f89aba90b72b9a550ad3a81b80f4dd3394bc493d","head":{"label":"allencloud:change-the-way-of-producing-engine-label","ref":"change-the-way-of-producing-engine-label","sha":"f89aba90b72b9a550ad3a81b80f4dd3394bc493d","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.githubusercontent.com/u/9465626?v=3","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"repo":{"id":52430214,"name":"swarm","full_name":"allencloud/swarm","owner":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.githubusercontent.com/u/9465626?v=3","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allencloud/swarm","description":"Swarm: a Docker-native clustering system","fork":true,"url":"https://api.github.com/repos/allencloud/swarm","forks_url":"https://api.github.com/repos/allencloud/swarm/forks","keys_url":"https://api.github.com/repos/allencloud/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allencloud/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allencloud/swarm/teams","hooks_url":"https://api.github.com/repos/allencloud/swarm/hooks","issue_events_url":"https://api.github.com/repos/allencloud/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/allencloud/swarm/events","assignees_url":"https://api.github.com/repos/allencloud/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/allencloud/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/allencloud/swarm/tags","blobs_url":"https://api.github.com/repos/allencloud/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allencloud/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allencloud/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/allencloud/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allencloud/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/allencloud/swarm/languages","stargazers_url":"https://api.github.com/repos/allencloud/swarm/stargazers","contributors_url":"https://api.github.com/repos/allencloud/swarm/contributors","subscribers_url":"https://api.github.com/repos/allencloud/swarm/subscribers","subscription_url":"https://api.github.com/repos/allencloud/swarm/subscription","commits_url":"https://api.github.com/repos/allencloud/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/allencloud/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/allencloud/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/allencloud/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/allencloud/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/allencloud/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allencloud/swarm/merges","archive_url":"https://api.github.com/repos/allencloud/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allencloud/swarm/downloads","issues_url":"https://api.github.com/repos/allencloud/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/allencloud/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/allencloud/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/allencloud/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allencloud/swarm/labels{/name}","releases_url":"https://api.github.com/repos/allencloud/swarm/releases{/id}","deployments_url":"https://api.github.com/repos/allencloud/swarm/deployments","created_at":"2016-02-24T09:27:58Z","updated_at":"2016-02-24T09:27:59Z","pushed_at":"2016-05-03T10:45:01Z","git_url":"git://github.com/allencloud/swarm.git","ssh_url":"git@github.com:allencloud/swarm.git","clone_url":"https://github.com/allencloud/swarm.git","svn_url":"https://github.com/allencloud/swarm","homepage":"","size":12339,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"e8cb44fe8177232651cc7f5cf85252305d1af834","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":19360616,"name":"swarm","full_name":"docker/swarm","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/swarm","description":"Swarm: a Docker-native clustering system","fork":false,"url":"https://api.github.com/repos/docker/swarm","forks_url":"https://api.github.com/repos/docker/swarm/forks","keys_url":"https://api.github.com/repos/docker/swarm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarm/teams","hooks_url":"https://api.github.com/repos/docker/swarm/hooks","issue_events_url":"https://api.github.com/repos/docker/swarm/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarm/events","assignees_url":"https://api.github.com/repos/docker/swarm/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarm/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarm/tags","blobs_url":"https://api.github.com/repos/docker/swarm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarm/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarm/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarm/languages","stargazers_url":"https://api.github.com/repos/docker/swarm/stargazers","contributors_url":"https://api.github.com/repos/docker/swarm/contributors","subscribers_url":"https://api.github.com/repos/docker/swarm/subscribers","subscription_url":"https://api.github.com/repos/docker/swarm/subscription","commits_url":"https://api.github.com/repos/docker/swarm/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarm/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarm/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarm/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarm/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarm/merges","archive_url":"https://api.github.com/repos/docker/swarm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarm/downloads","issues_url":"https://api.github.com/repos/docker/swarm/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarm/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarm/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarm/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarm/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarm/deployments","created_at":"2014-05-01T23:15:17Z","updated_at":"2016-05-03T07:35:17Z","pushed_at":"2016-05-03T08:12:38Z","git_url":"git://github.com/docker/swarm.git","ssh_url":"git@github.com:docker/swarm.git","clone_url":"https://github.com/docker/swarm.git","svn_url":"https://github.com/docker/swarm","homepage":"","size":55688,"stargazers_count":3665,"watchers_count":3665,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":694,"mirror_url":null,"open_issues_count":264,"forks":694,"open_issues":264,"watchers":3665,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarm/pulls/2202"},"html":{"href":"https://github.com/docker/swarm/pull/2202"},"issue":{"href":"https://api.github.com/repos/docker/swarm/issues/2202"},"comments":{"href":"https://api.github.com/repos/docker/swarm/issues/2202/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarm/pulls/2202/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarm/pulls/2202/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarm/statuses/f89aba90b72b9a550ad3a81b80f4dd3394bc493d"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":18,"deletions":6,"changed_files":1}}