{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/145593772","pull_request_review_id":70414296,"id":145593772,"diff_hunk":"@@ -676,7 +686,19 @@ func (s *ServiceController) lockedUpdateLoadBalancerHosts(service *v1.Service, h\n \t// This operation doesn't normally take very long (and happens pretty often), so we only record the final event\n \terr := s.balancer.UpdateLoadBalancer(s.clusterName, service, hosts)\n \tif err == nil {\n-\t\ts.eventRecorder.Event(service, v1.EventTypeNormal, \"UpdatedLoadBalancer\", \"Updated load balancer with new hosts\")\n+\t\t// If there are no available nodes for LoadBalancer service, we need to update service status.\n+\t\tif len(hosts) == 0 {\n+\t\t\tpreviousState := v1helper.LoadBalancerStatusDeepCopy(&service.Status.LoadBalancer)\n+\t\t\temptyState := &v1.LoadBalancerStatus{}\n+\t\t\terr = s.updateServiceStatus(service, previousState, emptyState)\n+\t\t\tif err != nil {\n+\t\t\t\tglog.Errorf(\"Failed to update the status of LoadBalancer service %s/%s\", service.Namespace, service.Name)\n+\t\t\t}\n+\n+\t\t\ts.eventRecorder.Eventf(service, v1.EventTypeWarning, \"UnAvailableService\", \"There are no available nodes for LoadBalancer service %s/%s\", service.Namespace, service.Name)","path":"pkg/controller/service/service_controller.go","position":70,"original_position":70,"commit_id":"c7da20b4045834fa4beff68b77a6ef955dedf6d2","original_commit_id":"c7da20b4045834fa4beff68b77a6ef955dedf6d2","user":{"login":"MrHohn","id":8681801,"avatar_url":"https://avatars0.githubusercontent.com/u/8681801?v=4","gravatar_id":"","url":"https://api.github.com/users/MrHohn","html_url":"https://github.com/MrHohn","followers_url":"https://api.github.com/users/MrHohn/followers","following_url":"https://api.github.com/users/MrHohn/following{/other_user}","gists_url":"https://api.github.com/users/MrHohn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHohn/subscriptions","organizations_url":"https://api.github.com/users/MrHohn/orgs","repos_url":"https://api.github.com/users/MrHohn/repos","events_url":"https://api.github.com/users/MrHohn/events{/privacy}","received_events_url":"https://api.github.com/users/MrHohn/received_events","type":"User","site_admin":false},"body":"Should it be `UnAvailableLoadBalancer` instead?","created_at":"2017-10-19T03:36:12Z","updated_at":"2017-10-19T03:47:13Z","html_url":"https://github.com/kubernetes/kubernetes/pull/53196#discussion_r145593772","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/145593772"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/53196#discussion_r145593772"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196","id":143601900,"html_url":"https://github.com/kubernetes/kubernetes/pull/53196","diff_url":"https://github.com/kubernetes/kubernetes/pull/53196.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/53196.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/53196","number":53196,"state":"open","locked":false,"title":"Check the count of cloud node for LoadBlancer service","user":{"login":"FengyunPan","id":19662444,"avatar_url":"https://avatars3.githubusercontent.com/u/19662444?v=4","gravatar_id":"","url":"https://api.github.com/users/FengyunPan","html_url":"https://github.com/FengyunPan","followers_url":"https://api.github.com/users/FengyunPan/followers","following_url":"https://api.github.com/users/FengyunPan/following{/other_user}","gists_url":"https://api.github.com/users/FengyunPan/gists{/gist_id}","starred_url":"https://api.github.com/users/FengyunPan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FengyunPan/subscriptions","organizations_url":"https://api.github.com/users/FengyunPan/orgs","repos_url":"https://api.github.com/users/FengyunPan/repos","events_url":"https://api.github.com/users/FengyunPan/events{/privacy}","received_events_url":"https://api.github.com/users/FengyunPan/received_events","type":"User","site_admin":false},"body":"If there is no available node for LoadBalancer service, the LoadBlancer\r\nservice will become unavailable, we should update service status.\r\nThis is part of #53193\r\n**What this PR does / why we need it**:\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: \r\nxref #53193\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n","created_at":"2017-09-28T09:46:05Z","updated_at":"2017-10-19T03:47:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75c18e877464957c9513090a0a1091063f7b3566","assignee":{"login":"bowei","id":837034,"avatar_url":"https://avatars1.githubusercontent.com/u/837034?v=4","gravatar_id":"","url":"https://api.github.com/users/bowei","html_url":"https://github.com/bowei","followers_url":"https://api.github.com/users/bowei/followers","following_url":"https://api.github.com/users/bowei/following{/other_user}","gists_url":"https://api.github.com/users/bowei/gists{/gist_id}","starred_url":"https://api.github.com/users/bowei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bowei/subscriptions","organizations_url":"https://api.github.com/users/bowei/orgs","repos_url":"https://api.github.com/users/bowei/repos","events_url":"https://api.github.com/users/bowei/events{/privacy}","received_events_url":"https://api.github.com/users/bowei/received_events","type":"User","site_admin":false},"assignees":[{"login":"bowei","id":837034,"avatar_url":"https://avatars1.githubusercontent.com/u/837034?v=4","gravatar_id":"","url":"https://api.github.com/users/bowei","html_url":"https://github.com/bowei","followers_url":"https://api.github.com/users/bowei/followers","following_url":"https://api.github.com/users/bowei/following{/other_user}","gists_url":"https://api.github.com/users/bowei/gists{/gist_id}","starred_url":"https://api.github.com/users/bowei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bowei/subscriptions","organizations_url":"https://api.github.com/users/bowei/orgs","repos_url":"https://api.github.com/users/bowei/repos","events_url":"https://api.github.com/users/bowei/events{/privacy}","received_events_url":"https://api.github.com/users/bowei/received_events","type":"User","site_admin":false},{"login":"MrHohn","id":8681801,"avatar_url":"https://avatars0.githubusercontent.com/u/8681801?v=4","gravatar_id":"","url":"https://api.github.com/users/MrHohn","html_url":"https://github.com/MrHohn","followers_url":"https://api.github.com/users/MrHohn/followers","following_url":"https://api.github.com/users/MrHohn/following{/other_user}","gists_url":"https://api.github.com/users/MrHohn/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHohn/subscriptions","organizations_url":"https://api.github.com/users/MrHohn/orgs","repos_url":"https://api.github.com/users/MrHohn/repos","events_url":"https://api.github.com/users/MrHohn/events{/privacy}","received_events_url":"https://api.github.com/users/MrHohn/received_events","type":"User","site_admin":false},{"login":"matchstick","id":19715963,"avatar_url":"https://avatars2.githubusercontent.com/u/19715963?v=4","gravatar_id":"","url":"https://api.github.com/users/matchstick","html_url":"https://github.com/matchstick","followers_url":"https://api.github.com/users/matchstick/followers","following_url":"https://api.github.com/users/matchstick/following{/other_user}","gists_url":"https://api.github.com/users/matchstick/gists{/gist_id}","starred_url":"https://api.github.com/users/matchstick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matchstick/subscriptions","organizations_url":"https://api.github.com/users/matchstick/orgs","repos_url":"https://api.github.com/users/matchstick/repos","events_url":"https://api.github.com/users/matchstick/events{/privacy}","received_events_url":"https://api.github.com/users/matchstick/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/53196/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/c7da20b4045834fa4beff68b77a6ef955dedf6d2","head":{"label":"FengyunPan:lb-empty-node","ref":"lb-empty-node","sha":"c7da20b4045834fa4beff68b77a6ef955dedf6d2","user":{"login":"FengyunPan","id":19662444,"avatar_url":"https://avatars3.githubusercontent.com/u/19662444?v=4","gravatar_id":"","url":"https://api.github.com/users/FengyunPan","html_url":"https://github.com/FengyunPan","followers_url":"https://api.github.com/users/FengyunPan/followers","following_url":"https://api.github.com/users/FengyunPan/following{/other_user}","gists_url":"https://api.github.com/users/FengyunPan/gists{/gist_id}","starred_url":"https://api.github.com/users/FengyunPan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FengyunPan/subscriptions","organizations_url":"https://api.github.com/users/FengyunPan/orgs","repos_url":"https://api.github.com/users/FengyunPan/repos","events_url":"https://api.github.com/users/FengyunPan/events{/privacy}","received_events_url":"https://api.github.com/users/FengyunPan/received_events","type":"User","site_admin":false},"repo":{"id":81077879,"name":"kubernetes","full_name":"FengyunPan/kubernetes","owner":{"login":"FengyunPan","id":19662444,"avatar_url":"https://avatars3.githubusercontent.com/u/19662444?v=4","gravatar_id":"","url":"https://api.github.com/users/FengyunPan","html_url":"https://github.com/FengyunPan","followers_url":"https://api.github.com/users/FengyunPan/followers","following_url":"https://api.github.com/users/FengyunPan/following{/other_user}","gists_url":"https://api.github.com/users/FengyunPan/gists{/gist_id}","starred_url":"https://api.github.com/users/FengyunPan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FengyunPan/subscriptions","organizations_url":"https://api.github.com/users/FengyunPan/orgs","repos_url":"https://api.github.com/users/FengyunPan/repos","events_url":"https://api.github.com/users/FengyunPan/events{/privacy}","received_events_url":"https://api.github.com/users/FengyunPan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FengyunPan/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/FengyunPan/kubernetes","forks_url":"https://api.github.com/repos/FengyunPan/kubernetes/forks","keys_url":"https://api.github.com/repos/FengyunPan/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FengyunPan/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FengyunPan/kubernetes/teams","hooks_url":"https://api.github.com/repos/FengyunPan/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/FengyunPan/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/FengyunPan/kubernetes/events","assignees_url":"https://api.github.com/repos/FengyunPan/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/FengyunPan/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/FengyunPan/kubernetes/tags","blobs_url":"https://api.github.com/repos/FengyunPan/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FengyunPan/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FengyunPan/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/FengyunPan/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FengyunPan/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/FengyunPan/kubernetes/languages","stargazers_url":"https://api.github.com/repos/FengyunPan/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/FengyunPan/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/FengyunPan/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/FengyunPan/kubernetes/subscription","commits_url":"https://api.github.com/repos/FengyunPan/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/FengyunPan/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/FengyunPan/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/FengyunPan/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/FengyunPan/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/FengyunPan/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FengyunPan/kubernetes/merges","archive_url":"https://api.github.com/repos/FengyunPan/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FengyunPan/kubernetes/downloads","issues_url":"https://api.github.com/repos/FengyunPan/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/FengyunPan/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/FengyunPan/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/FengyunPan/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FengyunPan/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/FengyunPan/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/FengyunPan/kubernetes/deployments","created_at":"2017-02-06T10:55:21Z","updated_at":"2017-02-06T10:55:49Z","pushed_at":"2017-10-13T11:53:13Z","git_url":"git://github.com/FengyunPan/kubernetes.git","ssh_url":"git@github.com:FengyunPan/kubernetes.git","clone_url":"https://github.com/FengyunPan/kubernetes.git","svn_url":"https://github.com/FengyunPan/kubernetes","homepage":"http://kubernetes.io","size":500168,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"kubernetes:master","ref":"master","sha":"846ba01925259fb2f00bdef8ead53f9fa21bad07","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars2.githubusercontent.com/u/13629408?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2017-10-19T03:41:31Z","pushed_at":"2017-10-19T03:47:11Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":722819,"stargazers_count":27835,"watchers_count":27835,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9975,"mirror_url":null,"open_issues_count":5570,"forks":9975,"open_issues":5570,"watchers":27835,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/53196"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/53196"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/53196/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/53196/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/c7da20b4045834fa4beff68b77a6ef955dedf6d2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MrHohn"}}