{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/79403364","id":79403364,"diff_hunk":"@@ -0,0 +1,130 @@\n+/*\n+Copyright 2015 The Kubernetes Authors.\n+\n+Licensed under the Apache License, Version 2.0 (the \"License\");\n+you may not use this file except in compliance with the License.\n+You may obtain a copy of the License at\n+\n+    http://www.apache.org/licenses/LICENSE-2.0\n+\n+Unless required by applicable law or agreed to in writing, software\n+distributed under the License is distributed on an \"AS IS\" BASIS,\n+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+See the License for the specific language governing permissions and\n+limitations under the License.\n+*/\n+\n+package e2e\n+\n+import (\n+\t\"fmt\"\n+\t. \"github.com/onsi/ginkgo\"\n+\tclient \"k8s.io/kubernetes/pkg/client/unversioned\"\n+\t\"k8s.io/kubernetes/test/e2e/framework\"\n+\t\"os/exec\"\n+\t\"path\"\n+\t\"regexp\"\n+\t\"strconv\"\n+)\n+\n+func addMasterReplica() error {\n+\tframework.Logf(fmt.Sprintf(\"Adding a new master replica:\"))\n+\tv, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, \"hack/e2e-internal/e2e-add-master.sh\"))\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tframework.Logf(\"%q\", v)\n+\treturn nil\n+}\n+\n+func removeMasterReplica() error {\n+\tframework.Logf(fmt.Sprintf(\"Removing an existing master replica:\"))\n+\tv, _, err := framework.RunCmd(path.Join(framework.TestContext.RepoRoot, \"hack/e2e-internal/e2e-remove-master.sh\"))\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tframework.Logf(\"%q\", v)\n+\treturn nil\n+}\n+\n+func verifyRCs(c *client.Client, ns string, names []string) {\n+\tfor _, name := range names {\n+\t\tframework.ExpectNoError(framework.VerifyPods(c, ns, name, true, 1))\n+\t}\n+}\n+\n+func createNewRC(c *client.Client, ns string, name string) {\n+\t_, err := newRCByName(c, ns, name, 1)\n+\tframework.ExpectNoError(err)\n+}\n+\n+func verifyNumberOfMasterReplicas(expected int) {\n+\toutput, err := exec.Command(\"gcloud\", \"compute\", \"instances\", \"list\",\n+\t\t\"--project=\"+framework.TestContext.CloudConfig.ProjectID,\n+\t\t\"--zone=\"+framework.TestContext.CloudConfig.Zone,","path":"test/e2e/ha_master.go","position":64,"original_position":64,"commit_id":"0421f72be229cffcc70c6fe5dff0fabb72781938","original_commit_id":"0421f72be229cffcc70c6fe5dff0fabb72781938","user":{"login":"jszczepkowski","id":10820769,"avatar_url":"https://avatars.githubusercontent.com/u/10820769?v=3","gravatar_id":"","url":"https://api.github.com/users/jszczepkowski","html_url":"https://github.com/jszczepkowski","followers_url":"https://api.github.com/users/jszczepkowski/followers","following_url":"https://api.github.com/users/jszczepkowski/following{/other_user}","gists_url":"https://api.github.com/users/jszczepkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jszczepkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszczepkowski/subscriptions","organizations_url":"https://api.github.com/users/jszczepkowski/orgs","repos_url":"https://api.github.com/users/jszczepkowski/repos","events_url":"https://api.github.com/users/jszczepkowski/events{/privacy}","received_events_url":"https://api.github.com/users/jszczepkowski/received_events","type":"User","site_admin":false},"body":"Currently, e2e tests run in a single zone: framework.TestContext.CloudConfig.Zone. So, there is no masters in a different zone. If we need multi-zone e2e test in future for ha-master (most probably: we will need), I will add handling additional zone(s) to test Context and in all required places (including here).","created_at":"2016-09-19T14:28:16Z","updated_at":"2016-09-19T14:28:16Z","html_url":"https://github.com/kubernetes/kubernetes/pull/32860#discussion_r79403364","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/79403364"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32860#discussion_r79403364"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860","id":85552043,"html_url":"https://github.com/kubernetes/kubernetes/pull/32860","diff_url":"https://github.com/kubernetes/kubernetes/pull/32860.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/32860.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32860","number":32860,"state":"open","locked":false,"title":"Added e2e framweork and a simple test for HA master.","user":{"login":"jszczepkowski","id":10820769,"avatar_url":"https://avatars.githubusercontent.com/u/10820769?v=3","gravatar_id":"","url":"https://api.github.com/users/jszczepkowski","html_url":"https://github.com/jszczepkowski","followers_url":"https://api.github.com/users/jszczepkowski/followers","following_url":"https://api.github.com/users/jszczepkowski/following{/other_user}","gists_url":"https://api.github.com/users/jszczepkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jszczepkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszczepkowski/subscriptions","organizations_url":"https://api.github.com/users/jszczepkowski/orgs","repos_url":"https://api.github.com/users/jszczepkowski/repos","events_url":"https://api.github.com/users/jszczepkowski/events{/privacy}","received_events_url":"https://api.github.com/users/jszczepkowski/received_events","type":"User","site_admin":false},"body":"Added e2e framweork for testing HA master. Added one simple e2e test for HA master that first grows and then shrinks GCE cluster.\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/32860)\n<!-- Reviewable:end -->\n","created_at":"2016-09-16T10:40:38Z","updated_at":"2016-09-19T14:28:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35909b059793076b98788f43ecff20816e7c0987","assignee":{"login":"fgrzadkowski","id":10820726,"avatar_url":"https://avatars.githubusercontent.com/u/10820726?v=3","gravatar_id":"","url":"https://api.github.com/users/fgrzadkowski","html_url":"https://github.com/fgrzadkowski","followers_url":"https://api.github.com/users/fgrzadkowski/followers","following_url":"https://api.github.com/users/fgrzadkowski/following{/other_user}","gists_url":"https://api.github.com/users/fgrzadkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/fgrzadkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgrzadkowski/subscriptions","organizations_url":"https://api.github.com/users/fgrzadkowski/orgs","repos_url":"https://api.github.com/users/fgrzadkowski/repos","events_url":"https://api.github.com/users/fgrzadkowski/events{/privacy}","received_events_url":"https://api.github.com/users/fgrzadkowski/received_events","type":"User","site_admin":false},"assignees":[{"login":"fgrzadkowski","id":10820726,"avatar_url":"https://avatars.githubusercontent.com/u/10820726?v=3","gravatar_id":"","url":"https://api.github.com/users/fgrzadkowski","html_url":"https://github.com/fgrzadkowski","followers_url":"https://api.github.com/users/fgrzadkowski/followers","following_url":"https://api.github.com/users/fgrzadkowski/following{/other_user}","gists_url":"https://api.github.com/users/fgrzadkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/fgrzadkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgrzadkowski/subscriptions","organizations_url":"https://api.github.com/users/fgrzadkowski/orgs","repos_url":"https://api.github.com/users/fgrzadkowski/repos","events_url":"https://api.github.com/users/fgrzadkowski/events{/privacy}","received_events_url":"https://api.github.com/users/fgrzadkowski/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":196,"closed_issues":51,"state":"open","created_at":"2016-08-16T21:47:28Z","updated_at":"2016-09-19T13:24:36Z","due_on":"2016-12-09T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32860/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/0421f72be229cffcc70c6fe5dff0fabb72781938","head":{"label":"jszczepkowski:ha-e2e-tests","ref":"ha-e2e-tests","sha":"0421f72be229cffcc70c6fe5dff0fabb72781938","user":{"login":"jszczepkowski","id":10820769,"avatar_url":"https://avatars.githubusercontent.com/u/10820769?v=3","gravatar_id":"","url":"https://api.github.com/users/jszczepkowski","html_url":"https://github.com/jszczepkowski","followers_url":"https://api.github.com/users/jszczepkowski/followers","following_url":"https://api.github.com/users/jszczepkowski/following{/other_user}","gists_url":"https://api.github.com/users/jszczepkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jszczepkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszczepkowski/subscriptions","organizations_url":"https://api.github.com/users/jszczepkowski/orgs","repos_url":"https://api.github.com/users/jszczepkowski/repos","events_url":"https://api.github.com/users/jszczepkowski/events{/privacy}","received_events_url":"https://api.github.com/users/jszczepkowski/received_events","type":"User","site_admin":false},"repo":{"id":30266090,"name":"kubernetes","full_name":"jszczepkowski/kubernetes","owner":{"login":"jszczepkowski","id":10820769,"avatar_url":"https://avatars.githubusercontent.com/u/10820769?v=3","gravatar_id":"","url":"https://api.github.com/users/jszczepkowski","html_url":"https://github.com/jszczepkowski","followers_url":"https://api.github.com/users/jszczepkowski/followers","following_url":"https://api.github.com/users/jszczepkowski/following{/other_user}","gists_url":"https://api.github.com/users/jszczepkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/jszczepkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszczepkowski/subscriptions","organizations_url":"https://api.github.com/users/jszczepkowski/orgs","repos_url":"https://api.github.com/users/jszczepkowski/repos","events_url":"https://api.github.com/users/jszczepkowski/events{/privacy}","received_events_url":"https://api.github.com/users/jszczepkowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jszczepkowski/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/jszczepkowski/kubernetes","forks_url":"https://api.github.com/repos/jszczepkowski/kubernetes/forks","keys_url":"https://api.github.com/repos/jszczepkowski/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jszczepkowski/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jszczepkowski/kubernetes/teams","hooks_url":"https://api.github.com/repos/jszczepkowski/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/jszczepkowski/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/jszczepkowski/kubernetes/events","assignees_url":"https://api.github.com/repos/jszczepkowski/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/jszczepkowski/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/jszczepkowski/kubernetes/tags","blobs_url":"https://api.github.com/repos/jszczepkowski/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jszczepkowski/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jszczepkowski/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/jszczepkowski/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jszczepkowski/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/jszczepkowski/kubernetes/languages","stargazers_url":"https://api.github.com/repos/jszczepkowski/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/jszczepkowski/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/jszczepkowski/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/jszczepkowski/kubernetes/subscription","commits_url":"https://api.github.com/repos/jszczepkowski/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/jszczepkowski/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/jszczepkowski/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/jszczepkowski/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/jszczepkowski/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/jszczepkowski/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jszczepkowski/kubernetes/merges","archive_url":"https://api.github.com/repos/jszczepkowski/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jszczepkowski/kubernetes/downloads","issues_url":"https://api.github.com/repos/jszczepkowski/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/jszczepkowski/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/jszczepkowski/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/jszczepkowski/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jszczepkowski/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/jszczepkowski/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/jszczepkowski/kubernetes/deployments","created_at":"2015-02-03T21:42:51Z","updated_at":"2016-06-15T09:36:12Z","pushed_at":"2016-09-16T14:52:37Z","git_url":"git://github.com/jszczepkowski/kubernetes.git","ssh_url":"git@github.com:jszczepkowski/kubernetes.git","clone_url":"https://github.com/jszczepkowski/kubernetes.git","svn_url":"https://github.com/jszczepkowski/kubernetes","homepage":"http://kubernetes.io","size":318098,"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":"15f619167d4f396c84ce5ca45d2a14753a683bc1","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-09-19T14:07:02Z","pushed_at":"2016-09-19T14:27:10Z","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":565456,"stargazers_count":16910,"watchers_count":16910,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5455,"mirror_url":null,"open_issues_count":4513,"forks":5455,"open_issues":4513,"watchers":16910,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32860"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32860"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32860/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32860/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/0421f72be229cffcc70c6fe5dff0fabb72781938"}}}}
{"actor":{"display_login":"jszczepkowski"}}