{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/38248033","id":38248033,"diff_hunk":"@@ -797,6 +797,75 @@ var _ = Describe(\"Services\", func() {\n \t})\n })\n \n+var _ = Describe(\"Services\", func() {\n+\tf := NewFramework(\"services-temp\")\n+\n+\tvar t *explorerTest\n+\tBeforeEach(func() {\n+\t\tt = newDefaultExplorerTest(f.Client, f.Namespace.Name)\n+\t})\n+\n+\tIt(\"should serve round-robin services round-robin\", func() {\n+\t\t_, _, svc := t.setup()\n+\n+\t\tnodeName := getFirstNodeNameOrDie(f.Client)\n+\n+\t\th := histogram{}\n+\t\tvar lastHostname string\n+\t\tsampleSize := 20\n+\t\tfor i := 0; i < sampleSize; i++ {\n+\t\t\t// we have to ssh in order to view the cluster through the lense of a Pod,\n+\t\t\t// i.e. this is the easiest way to only proxy through a single kube-proxy.\n+\t\t\t// unfortunately we can't use the apiserver proxy for this.\n+\t\t\tstdout, stderr, code, err := SSH(\"curl --silent http://\"+svc.Spec.ClusterIP+\"/hostname/\", nodeName, testContext.Provider)\n+\t\t\tExpect(err).NotTo(HaveOccurred(), \"error executing ssh: %v\", err)\n+\t\t\tExpect(code == 0).To(BeTrue(), \"error code was expected to be 0, but was %d: %s\", code, stderr)\n+\n+\t\t\thostname := strings.Trim(stdout, \" \")\n+\t\t\tExpect(hostname == lastHostname).To(BeFalse(), \"this hostname should not have been the last hostname\")\n+\t\t\th.observe(hostname)\n+\t\t}\n+\t\tfor _, count := range h {\n+\t\t\tExpect(count == sampleSize/2).To(BeTrue(), \"expected count to be half of sample size %v but was %v\", sampleSize, count)\n+\t\t}\n+\t})\n+\n+\tIt(\"should be unaffected by pod death\", func() {\n+\t\t_, pods, svc := t.setup()\n+\n+\t\tnodeName := getFirstNodeNameOrDie(f.Client)\n+\n+\t\tpodToKill := pods.Items[0]\n+\n+\t\tLogf(\"killing one pod in rc\")\n+\t\t_, err := f.Client.RESTClient.Get().\n+\t\t\tAbsPath(\"api/v1/proxy/namespaces\", f.Namespace.Name, \"pods\", podToKill.Name, \"quit\").\n+\t\t\tDoRaw()\n+\t\tExpect(err).NotTo(HaveOccurred(), \"error deleteing pod: %v\", err)\n+\n+\t\tLogf(\"checking service\")\n+\t\tExpect(wait.Poll(1*time.Second, 60*time.Second, func() (bool, error) {\n+\t\t\tstdin, stderr, code, err := SSH(\"curl --fail --silent http://\"+svc.Spec.ClusterIP+\"/hostname/\", nodeName, testContext.Provider)\n+\t\t\tif err != nil {\n+\t\t\t\treturn false, fmt.Errorf(\"error executing ssh: %v\", err)\n+\t\t\t}\n+\t\t\tif code != 0 {\n+\t\t\t\treturn false, fmt.Errorf(\"error code was expected to be 0, but was %d: %s\", code, stderr)\n+\n+\t\t\t}\n+\t\t\thostname := strings.Trim(stdin, \" \")\n+\t\t\tLogf(\"recieved response from pod: %s\", hostname)\n+\t\t\tif hostname != podToKill.Name {","path":"test/e2e/service.go","position":71,"original_position":71,"commit_id":"fa3ab39a2c0ba63bb4974d9e91dafadb67f81d53","original_commit_id":"fa3ab39a2c0ba63bb4974d9e91dafadb67f81d53","user":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"body":"Does this work if the pod gets restarted on a different node?","created_at":"2015-08-28T21:51:20Z","updated_at":"2015-08-28T21:51:20Z","html_url":"https://github.com/kubernetes/kubernetes/pull/11067#discussion_r38248033","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/38248033"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/11067#discussion_r38248033"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067","id":39707613,"html_url":"https://github.com/kubernetes/kubernetes/pull/11067","diff_url":"https://github.com/kubernetes/kubernetes/pull/11067.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/11067.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/11067","number":11067,"state":"open","locked":false,"title":"add misc. tests to increase service e2e coverage","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"add e2e test that verify kube-proxy serves round robin and that and that kube-proxy will stay available in the event of pod death.\r\n\r\n@quinton-hoole @satnam6502 \r\n\r\nrelated to #10268","created_at":"2015-07-10T17:49:21Z","updated_at":"2015-08-28T21:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cbf694d2c3e1e5efe23a03a7d23c15bc07feaaa","assignee":{"login":"quinton-hoole","id":10390785,"avatar_url":"https://avatars.githubusercontent.com/u/10390785?v=3","gravatar_id":"","url":"https://api.github.com/users/quinton-hoole","html_url":"https://github.com/quinton-hoole","followers_url":"https://api.github.com/users/quinton-hoole/followers","following_url":"https://api.github.com/users/quinton-hoole/following{/other_user}","gists_url":"https://api.github.com/users/quinton-hoole/gists{/gist_id}","starred_url":"https://api.github.com/users/quinton-hoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quinton-hoole/subscriptions","organizations_url":"https://api.github.com/users/quinton-hoole/orgs","repos_url":"https://api.github.com/users/quinton-hoole/repos","events_url":"https://api.github.com/users/quinton-hoole/events{/privacy}","received_events_url":"https://api.github.com/users/quinton-hoole/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/11067/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fa3ab39a2c0ba63bb4974d9e91dafadb67f81d53","head":{"label":"mikedanese:service-test-cover","ref":"service-test-cover","sha":"fa3ab39a2c0ba63bb4974d9e91dafadb67f81d53","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"repo":{"id":26203986,"name":"kubernetes","full_name":"mikedanese/kubernetes","owner":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikedanese/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/mikedanese/kubernetes","forks_url":"https://api.github.com/repos/mikedanese/kubernetes/forks","keys_url":"https://api.github.com/repos/mikedanese/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikedanese/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikedanese/kubernetes/teams","hooks_url":"https://api.github.com/repos/mikedanese/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mikedanese/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mikedanese/kubernetes/events","assignees_url":"https://api.github.com/repos/mikedanese/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mikedanese/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mikedanese/kubernetes/tags","blobs_url":"https://api.github.com/repos/mikedanese/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikedanese/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikedanese/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikedanese/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikedanese/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mikedanese/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mikedanese/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mikedanese/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mikedanese/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mikedanese/kubernetes/subscription","commits_url":"https://api.github.com/repos/mikedanese/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikedanese/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikedanese/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikedanese/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikedanese/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mikedanese/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikedanese/kubernetes/merges","archive_url":"https://api.github.com/repos/mikedanese/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikedanese/kubernetes/downloads","issues_url":"https://api.github.com/repos/mikedanese/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mikedanese/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mikedanese/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mikedanese/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikedanese/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mikedanese/kubernetes/releases{/id}","created_at":"2014-11-05T05:02:25Z","updated_at":"2015-04-15T00:20:12Z","pushed_at":"2015-08-28T18:37:05Z","git_url":"git://github.com/mikedanese/kubernetes.git","ssh_url":"git@github.com:mikedanese/kubernetes.git","clone_url":"https://github.com/mikedanese/kubernetes.git","svn_url":"https://github.com/mikedanese/kubernetes","homepage":null,"size":103363,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"3f2ac7864b64057970cfd23409630952bc6535fd","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":"Container Cluster Manager from Google","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-08-28T19:30:42Z","pushed_at":"2015-08-28T21:47:41Z","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":369384,"stargazers_count":9929,"watchers_count":9929,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2420,"mirror_url":null,"open_issues_count":1663,"forks":2420,"open_issues":1663,"watchers":9929,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/11067"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/11067"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/11067/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/11067/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/fa3ab39a2c0ba63bb4974d9e91dafadb67f81d53"}}}}