{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/229732692","pull_request_review_id":170297146,"id":229732692,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTczMjY5Mg==","diff_hunk":"@@ -146,7 +155,20 @@ func (p *HybridProxier) shouldEndpointsUseUserspace(endpoints *api.Endpoints) bo\n \treturn false\n }\n \n+// switchService moves a service between the unidling and main proxies.\n func (p *HybridProxier) switchService(name types.NamespacedName) {\n+\t// We shouldn't call switchService more than once (per switch), but there\n+\t// are some logic bugs where this happens\n+\t// So, cache the real state and don't allow this to be called twice.\n+\tp.serviceSwitchedLock.Lock()\n+\tdefer p.serviceSwitchedLock.Unlock()\n+\n+\tswitched, ok := p.serviceSwitched[name]\n+\tif ok && p.usingUserspace[name] == switched {\n+\t\tglog.V(6).Infof(\"hybrid proxy: ignoring duplicate switchService(%s/%s)\", name.Namespace, name.Name)\n+\t\treturn\n+\t}\n+","path":"pkg/proxy/hybrid/proxy.go","position":42,"original_position":42,"commit_id":"b184edac3132556a20d14a77b8c67432a25be08f","original_commit_id":"b184edac3132556a20d14a77b8c67432a25be08f","user":{"login":"dcbw","id":10926354,"node_id":"MDQ6VXNlcjEwOTI2MzU0","avatar_url":"https://avatars2.githubusercontent.com/u/10926354?v=4","gravatar_id":"","url":"https://api.github.com/users/dcbw","html_url":"https://github.com/dcbw","followers_url":"https://api.github.com/users/dcbw/followers","following_url":"https://api.github.com/users/dcbw/following{/other_user}","gists_url":"https://api.github.com/users/dcbw/gists{/gist_id}","starred_url":"https://api.github.com/users/dcbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcbw/subscriptions","organizations_url":"https://api.github.com/users/dcbw/orgs","repos_url":"https://api.github.com/users/dcbw/repos","events_url":"https://api.github.com/users/dcbw/events{/privacy}","received_events_url":"https://api.github.com/users/dcbw/received_events","type":"User","site_admin":false},"body":"So we never remove services from serviceSwitched, right?  We probably need to do that otherwise we grow the map forever.  Can we do that from ServiceDelete()?","created_at":"2018-10-31T15:02:01Z","updated_at":"2018-10-31T15:02:07Z","html_url":"https://github.com/openshift/origin/pull/21387#discussion_r229732692","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/21387","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/229732692"},"html":{"href":"https://github.com/openshift/origin/pull/21387#discussion_r229732692"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/21387"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/21387","id":226989641,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTg5NjQx","html_url":"https://github.com/openshift/origin/pull/21387","diff_url":"https://github.com/openshift/origin/pull/21387.diff","patch_url":"https://github.com/openshift/origin/pull/21387.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/21387","number":21387,"state":"open","locked":false,"title":"proxy: Don't allow multiple calls to switchService","user":{"login":"squeed","id":551378,"node_id":"MDQ6VXNlcjU1MTM3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/551378?v=4","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"body":"There are cases where switchService is called twice as a service is being unidled. This can cause the service to never actually appear back in the main proxy.\r\n\r\nRather than tracking down the logic bugs, just add some more state and short-circuit when called incorrectly.","created_at":"2018-10-30T16:19:39Z","updated_at":"2018-10-31T15:02:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c236f956efc00c50af8bf4a2242566a66558ef74","assignee":null,"assignees":[],"requested_reviewers":[{"login":"knobunc","id":10033853,"node_id":"MDQ6VXNlcjEwMDMzODUz","avatar_url":"https://avatars1.githubusercontent.com/u/10033853?v=4","gravatar_id":"","url":"https://api.github.com/users/knobunc","html_url":"https://github.com/knobunc","followers_url":"https://api.github.com/users/knobunc/followers","following_url":"https://api.github.com/users/knobunc/following{/other_user}","gists_url":"https://api.github.com/users/knobunc/gists{/gist_id}","starred_url":"https://api.github.com/users/knobunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knobunc/subscriptions","organizations_url":"https://api.github.com/users/knobunc/orgs","repos_url":"https://api.github.com/users/knobunc/repos","events_url":"https://api.github.com/users/knobunc/events{/privacy}","received_events_url":"https://api.github.com/users/knobunc/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":223051294,"node_id":"MDU6TGFiZWwyMjMwNTEyOTQ=","url":"https://api.github.com/repos/openshift/origin/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":640547984,"node_id":"MDU6TGFiZWw2NDA1NDc5ODQ=","url":"https://api.github.com/repos/openshift/origin/labels/size/S","name":"size/S","color":"77bb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/21387/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/21387/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/21387/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/b184edac3132556a20d14a77b8c67432a25be08f","head":{"label":"squeed:unidling-double-switch","ref":"unidling-double-switch","sha":"b184edac3132556a20d14a77b8c67432a25be08f","user":{"login":"squeed","id":551378,"node_id":"MDQ6VXNlcjU1MTM3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/551378?v=4","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"repo":{"id":144288115,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQyODgxMTU=","name":"origin","full_name":"squeed/origin","private":false,"owner":{"login":"squeed","id":551378,"node_id":"MDQ6VXNlcjU1MTM3OA==","avatar_url":"https://avatars2.githubusercontent.com/u/551378?v=4","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"html_url":"https://github.com/squeed/origin","description":"Enterprise Kubernetes for Developers","fork":true,"url":"https://api.github.com/repos/squeed/origin","forks_url":"https://api.github.com/repos/squeed/origin/forks","keys_url":"https://api.github.com/repos/squeed/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squeed/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squeed/origin/teams","hooks_url":"https://api.github.com/repos/squeed/origin/hooks","issue_events_url":"https://api.github.com/repos/squeed/origin/issues/events{/number}","events_url":"https://api.github.com/repos/squeed/origin/events","assignees_url":"https://api.github.com/repos/squeed/origin/assignees{/user}","branches_url":"https://api.github.com/repos/squeed/origin/branches{/branch}","tags_url":"https://api.github.com/repos/squeed/origin/tags","blobs_url":"https://api.github.com/repos/squeed/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squeed/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squeed/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/squeed/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squeed/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/squeed/origin/languages","stargazers_url":"https://api.github.com/repos/squeed/origin/stargazers","contributors_url":"https://api.github.com/repos/squeed/origin/contributors","subscribers_url":"https://api.github.com/repos/squeed/origin/subscribers","subscription_url":"https://api.github.com/repos/squeed/origin/subscription","commits_url":"https://api.github.com/repos/squeed/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/squeed/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/squeed/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/squeed/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/squeed/origin/contents/{+path}","compare_url":"https://api.github.com/repos/squeed/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squeed/origin/merges","archive_url":"https://api.github.com/repos/squeed/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squeed/origin/downloads","issues_url":"https://api.github.com/repos/squeed/origin/issues{/number}","pulls_url":"https://api.github.com/repos/squeed/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/squeed/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/squeed/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squeed/origin/labels{/name}","releases_url":"https://api.github.com/repos/squeed/origin/releases{/id}","deployments_url":"https://api.github.com/repos/squeed/origin/deployments","created_at":"2018-08-10T13:15:33Z","updated_at":"2018-10-30T16:19:38Z","pushed_at":"2018-10-30T16:18:52Z","git_url":"git://github.com/squeed/origin.git","ssh_url":"git@github.com:squeed/origin.git","clone_url":"https://github.com/squeed/origin.git","svn_url":"https://github.com/squeed/origin","homepage":"http://www.openshift.org","size":969224,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"76595af8fc7171ab9e521c22c00efadf084817c7","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"node_id":"MDEwOlJlcG9zaXRvcnkyMjQ0MjY2OA==","name":"origin","full_name":"openshift/origin","private":false,"owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openshift/origin","description":"Enterprise Kubernetes for Developers","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2018-10-31T13:02:55Z","pushed_at":"2018-10-31T14:58:57Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":972827,"stargazers_count":5292,"watchers_count":5292,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3210,"mirror_url":null,"archived":false,"open_issues_count":556,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3210,"open_issues":556,"watchers":5292,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/21387"},"html":{"href":"https://github.com/openshift/origin/pull/21387"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/21387"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/21387/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/21387/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/21387/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/b184edac3132556a20d14a77b8c67432a25be08f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dcbw"}}