{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/83985809","pull_request_review_id":4792863,"id":83985809,"diff_hunk":"@@ -178,6 +178,10 @@ func (daemon *Daemon) SetupIngress(create clustertypes.NetworkCreateRequest, nod\n \t\tif err := ep.Join(sb, nil); err != nil {\n \t\t\tlogrus.Errorf(\"Failed joining ingress sandbox to ingress endpoint: %v\", err)\n \t\t}\n+\n+\t\tif err := sb.EnableService(); err != nil {\n+\t\t\tlogrus.Errorf(\"Failed enabling service for ingress sandbox: %v\", err)","path":"daemon/network.go","position":6,"original_position":6,"commit_id":"8e1b2bb7f1bbc15ec980226467fe06720518f4b8","original_commit_id":"121671b99b13c14a1dec4dd3d5231c861b14a2c4","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},"body":"`WithError(err)` is not used here to be consistent with other logs in this file.","created_at":"2016-10-19T01:57:13Z","updated_at":"2016-10-19T01:57:13Z","html_url":"https://github.com/docker/docker/pull/27279#discussion_r83985809","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/27279","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/83985809"},"html":{"href":"https://github.com/docker/docker/pull/27279#discussion_r83985809"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/27279"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/27279","id":88789573,"html_url":"https://github.com/docker/docker/pull/27279","diff_url":"https://github.com/docker/docker/pull/27279.diff","patch_url":"https://github.com/docker/docker/pull/27279.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/27279","number":27279,"state":"open","locked":false,"title":"[WIP] Support health aware load balancing","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},"body":"This change support health aware load balancing and DNS records. Close #24092. \r\n\r\n**- What I did**\r\n\r\nA container is added to service records when it starts (without healthcheck config), or when healthcheck passes. \r\n\r\n**- How I did it**\r\n\r\nCherrypick @sanimej's service enable API. Add service activate API. Add instruments to container start and shutdown to activate/deactivate service records. \r\n\r\n**- How to verify it**\r\n\r\nHere are the steps to verify the change.  \r\n```\r\n#on one of your node poll HTTP endpoint\r\nwhile true; do curl -s http://127.0.0.1:8001 | head -n 1; sleep 0.1; done\r\n#run a service with published port\r\ndocker service create -p 8001:5000 --replicas 1 --name test dongluochen/simpleweb:0.2\r\n#from HTTP poll validate the container is added to load balancer only when it becomes healthy\r\n#scale your service \r\ndocker service scale test=10\r\n#validate the new containers are added only when they become healthy\r\n#downsize your service \r\ndocker service scale test=1\r\n#validate the containers are removed quickly\r\n```\r\n\r\nDocker/docker integration test doesn't support this type of testing. No integration test is added. \r\n\r\n**- Description for the changelog**\r\n\r\nThis PR cherrypicks @sanimej's change. It cannot be merged as it is. After review, the cherrypick should be replaced by change from docker/libnetwork. \r\n\r\nPing @sanimej @mrjana .\r\n","created_at":"2016-10-11T08:21:10Z","updated_at":"2016-10-19T01:57:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"893193018da0060eb3ba9fdce5da0899dfdfb4f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/27279/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/27279/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/27279/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/8e1b2bb7f1bbc15ec980226467fe06720518f4b8","head":{"label":"dongluochen:lbapi_integration","ref":"lbapi_integration","sha":"8e1b2bb7f1bbc15ec980226467fe06720518f4b8","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},"repo":{"id":45070279,"name":"docker","full_name":"dongluochen/docker","owner":{"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},"private":false,"html_url":"https://github.com/dongluochen/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/dongluochen/docker","forks_url":"https://api.github.com/repos/dongluochen/docker/forks","keys_url":"https://api.github.com/repos/dongluochen/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dongluochen/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dongluochen/docker/teams","hooks_url":"https://api.github.com/repos/dongluochen/docker/hooks","issue_events_url":"https://api.github.com/repos/dongluochen/docker/issues/events{/number}","events_url":"https://api.github.com/repos/dongluochen/docker/events","assignees_url":"https://api.github.com/repos/dongluochen/docker/assignees{/user}","branches_url":"https://api.github.com/repos/dongluochen/docker/branches{/branch}","tags_url":"https://api.github.com/repos/dongluochen/docker/tags","blobs_url":"https://api.github.com/repos/dongluochen/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dongluochen/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dongluochen/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/dongluochen/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dongluochen/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/dongluochen/docker/languages","stargazers_url":"https://api.github.com/repos/dongluochen/docker/stargazers","contributors_url":"https://api.github.com/repos/dongluochen/docker/contributors","subscribers_url":"https://api.github.com/repos/dongluochen/docker/subscribers","subscription_url":"https://api.github.com/repos/dongluochen/docker/subscription","commits_url":"https://api.github.com/repos/dongluochen/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/dongluochen/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/dongluochen/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/dongluochen/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/dongluochen/docker/contents/{+path}","compare_url":"https://api.github.com/repos/dongluochen/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dongluochen/docker/merges","archive_url":"https://api.github.com/repos/dongluochen/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dongluochen/docker/downloads","issues_url":"https://api.github.com/repos/dongluochen/docker/issues{/number}","pulls_url":"https://api.github.com/repos/dongluochen/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/dongluochen/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/dongluochen/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dongluochen/docker/labels{/name}","releases_url":"https://api.github.com/repos/dongluochen/docker/releases{/id}","deployments_url":"https://api.github.com/repos/dongluochen/docker/deployments","created_at":"2015-10-27T21:11:08Z","updated_at":"2015-10-27T21:11:20Z","pushed_at":"2016-10-19T01:55:08Z","git_url":"git://github.com/dongluochen/docker.git","ssh_url":"git@github.com:dongluochen/docker.git","clone_url":"https://github.com/dongluochen/docker.git","svn_url":"https://github.com/dongluochen/docker","homepage":"http://www.docker.com","size":100936,"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":"3b0660da30a23b86a2f29f1ecf3ded52ab7fe577","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":7691631,"name":"docker","full_name":"docker/docker","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/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","deployments_url":"https://api.github.com/repos/docker/docker/deployments","created_at":"2013-01-18T18:10:57Z","updated_at":"2016-10-19T01:44:00Z","pushed_at":"2016-10-19T01:55:10Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":215268,"stargazers_count":36030,"watchers_count":36030,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10610,"mirror_url":null,"open_issues_count":1946,"forks":10610,"open_issues":1946,"watchers":36030,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/27279"},"html":{"href":"https://github.com/docker/docker/pull/27279"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/27279"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/27279/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/27279/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/27279/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/8e1b2bb7f1bbc15ec980226467fe06720518f4b8"}}}}
{"actor":{"display_login":"dongluochen"}}