{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/85386296","pull_request_review_id":6106743,"id":85386296,"diff_hunk":"@@ -259,27 +266,46 @@ func resizeRC(c clientset.Interface, ns, name string, replicas int32) error {\n \treturn err\n }\n \n-func getMaster(c clientset.Interface) string {\n-\tmaster := \"\"\n+// getMaster populates the externalIP, internalIP and hostname fields of the master.\n+// If any of these is unavailable, it is set to \"\".\n+func getMaster(c clientset.Interface) Address {\n+\tmaster := Address{}\n+\n+\t// Populate the internal IP.\n+\teps, err := c.Core().Endpoints(api.NamespaceDefault).Get(\"kubernetes\")\n+\tif err != nil {\n+\t\tframework.Failf(\"Failed to get kubernetes endpoints: %v\", err)\n+\t}\n+\tif len(eps.Subsets) != 1 || len(eps.Subsets[0].Addresses) != 1 {\n+\t\tframework.Failf(\"There are more than 1 endpoints for kubernetes service: %+v\", eps)\n+\t}\n+\tmaster.internalIP = eps.Subsets[0].Addresses[0].IP","path":"test/e2e/resize_nodes.go","position":40,"original_position":40,"commit_id":"001b0fcf69ffbcc84502c8151abdc459e3ecbf8c","original_commit_id":"001b0fcf69ffbcc84502c8151abdc459e3ecbf8c","user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"body":"can you actually check that it has a rfc 1918 prefix?  (10, 172.16, 192.168), or, if you don't think it's worth it please add a comment. If you check it, and it isn't a private ip, you should log an error and stick the ip in externalIP instead.  I don't think it matter which we trust if both this and --api-server turns out to be an external ip. ","created_at":"2016-10-27T17:23:24Z","updated_at":"2016-10-27T17:29:33Z","html_url":"https://github.com/kubernetes/kubernetes/pull/35581#discussion_r85386296","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/85386296"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/35581#discussion_r85386296"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581","id":90933618,"html_url":"https://github.com/kubernetes/kubernetes/pull/35581","diff_url":"https://github.com/kubernetes/kubernetes/pull/35581.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/35581.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35581","number":35581,"state":"open","locked":false,"title":"Fixing e2e tests which rely on network disruptions","user":{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**: It fixes e2e tests  on network disruptions\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes https://github.com/kubernetes/kubernetes/issues/27324, https://github.com/kubernetes/kubernetes/issues/35293\r\n\r\nhttps://github.com/kubernetes/kubernetes/pull/33655 changed the kubelet's `--api-server` flag to use the external IP address of the APIServer in GCE. Hence, the iptables rules were failing previously. We now return the external IP for `getMaster()`. This fix is required in order to write e2e tests which test behavior in the face of network disruptions.\r\n\r\n/cc @bprashanth @dchen1107 @kubernetes/sig-apps\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/35581)\n<!-- Reviewable:end -->\n","created_at":"2016-10-26T04:11:24Z","updated_at":"2016-10-27T17:29:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e47db1d16a1eacae437e52e07975d7d36441fd9","assignee":{"login":"bowei","id":837034,"avatar_url":"https://avatars.githubusercontent.com/u/837034?v=3","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://avatars.githubusercontent.com/u/837034?v=3","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":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},{"login":"matchstick","id":19715963,"avatar_url":"https://avatars.githubusercontent.com/u/19715963?v=3","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}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.5","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/23/labels","id":1945978,"number":23,"title":"v1.5","description":"","creator":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"open_issues":239,"closed_issues":200,"state":"open","created_at":"2016-08-16T21:47:28Z","updated_at":"2016-10-27T17:12:00Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/35581/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/001b0fcf69ffbcc84502c8151abdc459e3ecbf8c","head":{"label":"foxish:fix-network-partition-e2e","ref":"fix-network-partition-e2e","sha":"001b0fcf69ffbcc84502c8151abdc459e3ecbf8c","user":{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false},"repo":{"id":62426557,"name":"kubernetes","full_name":"foxish/kubernetes","owner":{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foxish/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/foxish/kubernetes","forks_url":"https://api.github.com/repos/foxish/kubernetes/forks","keys_url":"https://api.github.com/repos/foxish/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foxish/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foxish/kubernetes/teams","hooks_url":"https://api.github.com/repos/foxish/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/foxish/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/foxish/kubernetes/events","assignees_url":"https://api.github.com/repos/foxish/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/foxish/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/foxish/kubernetes/tags","blobs_url":"https://api.github.com/repos/foxish/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foxish/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foxish/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/foxish/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foxish/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/foxish/kubernetes/languages","stargazers_url":"https://api.github.com/repos/foxish/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/foxish/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/foxish/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/foxish/kubernetes/subscription","commits_url":"https://api.github.com/repos/foxish/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/foxish/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/foxish/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/foxish/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/foxish/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/foxish/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foxish/kubernetes/merges","archive_url":"https://api.github.com/repos/foxish/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foxish/kubernetes/downloads","issues_url":"https://api.github.com/repos/foxish/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/foxish/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/foxish/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/foxish/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foxish/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/foxish/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/foxish/kubernetes/deployments","created_at":"2016-07-02T00:30:27Z","updated_at":"2016-07-02T00:30:44Z","pushed_at":"2016-10-27T17:28:36Z","git_url":"git://github.com/foxish/kubernetes.git","ssh_url":"git@github.com:foxish/kubernetes.git","clone_url":"https://github.com/foxish/kubernetes.git","svn_url":"https://github.com/foxish/kubernetes","homepage":"http://kubernetes.io","size":343089,"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":"kubernetes:master","ref":"master","sha":"29d8c39a374f901dfd34b08ca4ba0f211233ed04","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","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://avatars.githubusercontent.com/u/13629408?v=3","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":"2016-10-27T16:03:24Z","pushed_at":"2016-10-27T17:29:16Z","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":606632,"stargazers_count":17970,"watchers_count":17970,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5850,"mirror_url":null,"open_issues_count":5147,"forks":5850,"open_issues":5147,"watchers":17970,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/35581"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/35581"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/35581/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/35581/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/001b0fcf69ffbcc84502c8151abdc459e3ecbf8c"}}}}
{"actor":{"display_login":"bprashanth"}}