{"action":"created","comment":{"url":"https://api.github.com/repos/cilium/cilium/pulls/comments/222641462","pull_request_review_id":161576252,"id":222641462,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjY0MTQ2Mg==","diff_hunk":"@@ -214,6 +225,44 @@ func (d *Daemon) regenerateRestoredEndpoints(state *endpointRestoreState) {\n \t\t\t\t\t\tlogfields.IdentityLabels + \".old\": oldSecID,\n \t\t\t\t\t\tlogfields.IdentityLabels + \".new\": identity.ID,\n \t\t\t\t\t}).Info(\"Security identity for endpoint is different from the security identity restored for the endpoint\")\n+\n+\t\t\t\t\t// The identity of the endpoint being\n+\t\t\t\t\t// restored has changed. This can be\n+\t\t\t\t\t// caused by two main reasons:\n+\t\t\t\t\t//\n+\t\t\t\t\t// 1) Cilium has been upgraded,\n+\t\t\t\t\t// downgraded or the configuration has\n+\t\t\t\t\t// changed and the new version or\n+\t\t\t\t\t// configuration causes different\n+\t\t\t\t\t// labels to be considered security\n+\t\t\t\t\t// relevant for this endpoint.\n+\t\t\t\t\t//\n+\t\t\t\t\t// Immediately using the identity may\n+\t\t\t\t\t// cause connectivity problems if this\n+\t\t\t\t\t// is the first endpoint in the cluster\n+\t\t\t\t\t// to use the new identity. All other\n+\t\t\t\t\t// nodes will not have had a chance to\n+\t\t\t\t\t// adjust the security policies for\n+\t\t\t\t\t// their endpoints. Hence, apply a\n+\t\t\t\t\t// grace period to allow for the\n+\t\t\t\t\t// update. It is not required to check\n+\t\t\t\t\t// any local endpoints for potential\n+\t\t\t\t\t// outdated security rules, the\n+\t\t\t\t\t// notification of the new security\n+\t\t\t\t\t// identity will have been received and\n+\t\t\t\t\t// will trigger the necessary\n+\t\t\t\t\t// recalculation of all local\n+\t\t\t\t\t// endpoints.\n+\t\t\t\t\t//\n+\t\t\t\t\t// 2) The identity is outdated as the\n+\t\t\t\t\t// state in the kvstore has changed.\n+\t\t\t\t\t// This reason would justify an\n+\t\t\t\t\t// immediate use of the new identity\n+\t\t\t\t\t// but given the current identity is\n+\t\t\t\t\t// already in place, it is also correct\n+\t\t\t\t\t// to continue using it for the\n+\t\t\t\t\t// duration of a grace period.\n+\t\t\t\t\ttime.Sleep(defaults.IdentityChangeGracePeriod)","path":"daemon/state.go","position":76,"original_position":76,"commit_id":"78b6a68537b89dc9e661eca424fa389b23658744","original_commit_id":"78b6a68537b89dc9e661eca424fa389b23658744","user":{"login":"raybejjani","id":744312,"node_id":"MDQ6VXNlcjc0NDMxMg==","avatar_url":"https://avatars0.githubusercontent.com/u/744312?v=4","gravatar_id":"","url":"https://api.github.com/users/raybejjani","html_url":"https://github.com/raybejjani","followers_url":"https://api.github.com/users/raybejjani/followers","following_url":"https://api.github.com/users/raybejjani/following{/other_user}","gists_url":"https://api.github.com/users/raybejjani/gists{/gist_id}","starred_url":"https://api.github.com/users/raybejjani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raybejjani/subscriptions","organizations_url":"https://api.github.com/users/raybejjani/orgs","repos_url":"https://api.github.com/users/raybejjani/repos","events_url":"https://api.github.com/users/raybejjani/events{/privacy}","received_events_url":"https://api.github.com/users/raybejjani/received_events","type":"User","site_admin":false},"body":"oops, nevermind, it is a goroutine","created_at":"2018-10-04T12:10:12Z","updated_at":"2018-10-04T12:10:12Z","html_url":"https://github.com/cilium/cilium/pull/5771#discussion_r222641462","pull_request_url":"https://api.github.com/repos/cilium/cilium/pulls/5771","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments/222641462"},"html":{"href":"https://github.com/cilium/cilium/pull/5771#discussion_r222641462"},"pull_request":{"href":"https://api.github.com/repos/cilium/cilium/pulls/5771"}},"in_reply_to_id":222640684},"pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/5771","id":220068272,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMDY4Mjcy","html_url":"https://github.com/cilium/cilium/pull/5771","diff_url":"https://github.com/cilium/cilium/pull/5771.diff","patch_url":"https://github.com/cilium/cilium/pull/5771.patch","issue_url":"https://api.github.com/repos/cilium/cilium/issues/5771","number":5771,"state":"open","locked":false,"title":"endpoint: Establish grace period when endpoint changes identity","user":{"login":"tgraf","id":1417913,"node_id":"MDQ6VXNlcjE0MTc5MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1417913?v=4","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"body":"So far, when an endpoint had changed its identity, the changed identity was\r\nused immediately. This caused potential downtime for the service as the\r\ntime frame between the allocation of the security identity and use of it cluster-wide was potentially very short.\r\n\r\nBy establishing a grace period, other nodes in the cluster have time to get\r\nnotified about the new security identity and can whitelist the new security\r\nidentity for existing endpoints. This reduces the risk of potential downtime\r\nwhen endpoints are changing security identity.\r\n\r\nThe downside of the grace period is that the use of the new identity is delayed\r\nfor some time.\r\n\r\nFor now, the grace period is 20 seconds.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cilium/cilium/5771)\n<!-- Reviewable:end -->\n","created_at":"2018-10-03T14:53:55Z","updated_at":"2018-10-04T12:10:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e075f39984a050c9bb4d140b42d5d12606144ca","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1007718548,"node_id":"MDU6TGFiZWwxMDA3NzE4NTQ4","url":"https://api.github.com/repos/cilium/cilium/labels/needs-backport/1.2","name":"needs-backport/1.2","color":"4f3daa","default":false},{"id":403149902,"node_id":"MDU6TGFiZWw0MDMxNDk5MDI=","url":"https://api.github.com/repos/cilium/cilium/labels/pending-review","name":"pending-review","color":"fbca04","default":false},{"id":627462913,"node_id":"MDU6TGFiZWw2Mjc0NjI5MTM=","url":"https://api.github.com/repos/cilium/cilium/labels/priority/high","name":"priority/high","color":"b60205","default":false},{"id":732924468,"node_id":"MDU6TGFiZWw3MzI5MjQ0Njg=","url":"https://api.github.com/repos/cilium/cilium/labels/release-note/bug","name":"release-note/bug","color":"c2e0c6","default":false}],"milestone":{"url":"https://api.github.com/repos/cilium/cilium/milestones/18","html_url":"https://github.com/cilium/cilium/milestone/18","labels_url":"https://api.github.com/repos/cilium/cilium/milestones/18/labels","id":3568158,"node_id":"MDk6TWlsZXN0b25lMzU2ODE1OA==","number":18,"title":"1.3-bugfix-exception","description":"","creator":{"login":"tgraf","id":1417913,"node_id":"MDQ6VXNlcjE0MTc5MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1417913?v=4","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":44,"state":"open","created_at":"2018-08-14T09:53:10Z","updated_at":"2018-10-04T09:42:20Z","due_on":"2018-10-03T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/cilium/cilium/pulls/5771/commits","review_comments_url":"https://api.github.com/repos/cilium/cilium/pulls/5771/comments","review_comment_url":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/5771/comments","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/78b6a68537b89dc9e661eca424fa389b23658744","head":{"label":"cilium:pr/tgraf/identity-change-grace-period","ref":"pr/tgraf/identity-change-grace-period","sha":"78b6a68537b89dc9e661eca424fa389b23658744","user":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"node_id":"MDEwOlJlcG9zaXRvcnk0ODEwOTIzOQ==","name":"cilium","full_name":"cilium/cilium","private":false,"owner":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cilium/cilium","description":"HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2018-10-04T09:48:18Z","pushed_at":"2018-10-04T10:00:25Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":64183,"stargazers_count":2870,"watchers_count":2870,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":257,"mirror_url":null,"archived":false,"open_issues_count":499,"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":257,"open_issues":499,"watchers":2870,"default_branch":"master"}},"base":{"label":"cilium:master","ref":"master","sha":"12503f468f89c3e840201744dce03613f198b256","user":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"node_id":"MDEwOlJlcG9zaXRvcnk0ODEwOTIzOQ==","name":"cilium","full_name":"cilium/cilium","private":false,"owner":{"login":"cilium","id":21054566,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMDU0NTY2","avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cilium/cilium","description":"HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2018-10-04T09:48:18Z","pushed_at":"2018-10-04T10:00:25Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":64183,"stargazers_count":2870,"watchers_count":2870,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":257,"mirror_url":null,"archived":false,"open_issues_count":499,"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":257,"open_issues":499,"watchers":2870,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/5771"},"html":{"href":"https://github.com/cilium/cilium/pull/5771"},"issue":{"href":"https://api.github.com/repos/cilium/cilium/issues/5771"},"comments":{"href":"https://api.github.com/repos/cilium/cilium/issues/5771/comments"},"review_comments":{"href":"https://api.github.com/repos/cilium/cilium/pulls/5771/comments"},"review_comment":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cilium/cilium/pulls/5771/commits"},"statuses":{"href":"https://api.github.com/repos/cilium/cilium/statuses/78b6a68537b89dc9e661eca424fa389b23658744"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"raybejjani"}}