{"action":"created","issue":{"url":"https://api.github.com/repos/cilium/cilium/issues/4810","repository_url":"https://api.github.com/repos/cilium/cilium","labels_url":"https://api.github.com/repos/cilium/cilium/issues/4810/labels{/name}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/4810/comments","events_url":"https://api.github.com/repos/cilium/cilium/issues/4810/events","html_url":"https://github.com/cilium/cilium/pull/4810","id":340099863,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwNTkyNTAx","number":4810,"title":"ipcache: Fix handling of endpoint IP events","user":{"login":"rlenglet","id":126329,"node_id":"MDQ6VXNlcjEyNjMyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/126329?v=4","gravatar_id":"","url":"https://api.github.com/users/rlenglet","html_url":"https://github.com/rlenglet","followers_url":"https://api.github.com/users/rlenglet/followers","following_url":"https://api.github.com/users/rlenglet/following{/other_user}","gists_url":"https://api.github.com/users/rlenglet/gists{/gist_id}","starred_url":"https://api.github.com/users/rlenglet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlenglet/subscriptions","organizations_url":"https://api.github.com/users/rlenglet/orgs","repos_url":"https://api.github.com/users/rlenglet/repos","events_url":"https://api.github.com/users/rlenglet/events{/privacy}","received_events_url":"https://api.github.com/users/rlenglet/received_events","type":"User","site_admin":false},"labels":[{"id":721366506,"node_id":"MDU6TGFiZWw3MjEzNjY1MDY=","url":"https://api.github.com/repos/cilium/cilium/labels/area/daemon","name":"area/daemon","color":"089dd8","default":false},{"id":721424175,"node_id":"MDU6TGFiZWw3MjE0MjQxNzU=","url":"https://api.github.com/repos/cilium/cilium/labels/area/proxy","name":"area/proxy","color":"fef2c0","default":false},{"id":300384439,"node_id":"MDU6TGFiZWwzMDAzODQ0Mzk=","url":"https://api.github.com/repos/cilium/cilium/labels/kind/bug","name":"kind/bug","color":"fc2929","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}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-07-11T05:45:56Z","updated_at":"2018-07-11T08:16:20Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/4810","html_url":"https://github.com/cilium/cilium/pull/4810","diff_url":"https://github.com/cilium/cilium/pull/4810.diff","patch_url":"https://github.com/cilium/cilium/pull/4810.patch"},"body":"Move the slice of ipcache listeners from `Daemon` into `IPCache`.\r\nFactorize and encapsulate the handling of listeners into `IPCache`'s `Upsert` and `Delete` methods to reduce the complexity of callers.\r\n\r\nModify the signature of the `OnIPIdentityCacheChange` method in the `IPIdentityMappingListener` interface.\r\nSpecify that the given IP is always in CIDR form, with a prefix length, even when it represents an endpoint IP.\r\nUse stronger types in the signature to clarify that only the identity and host IP associated with the CIDR may be modified.\r\n\r\nFix the `Upsert` and `Delete` to handle all cases of CIDR shadowing by endpoint IP:\r\n\r\n- If inserting a new CIDR that is shadowed by an existing endpoint IP, don't callback the listeners about the insert.\r\n- If inserting a new endpoint IP that is shadowing an existing CIDR, notify the listeners of an update of the identity associated with the CIDR, instead of an insert. If the shadowed CIDR and the endpoint IP are associated with the same identity, don't callback.\r\n- If deleting a CIDR that was shadowed by an endpoint IP, don't callback the listeners about the delete.\r\n- If deleting an endpoint IP that was shadowing a CIDR, notify the listeners of an update of the identity associated with the CIDR, instead of a delete. If the shadowed CIDR and the endpoint IP were associated with the same identity, don't callback.\r\n\r\nIn `Upsert`, when updating an IP's identity, delete the old identity from the identity-to-IP map.\r\n\r\nFixes: https://github.com/cilium/cilium/issues/4803\r\nFixes: https://github.com/cilium/cilium/issues/4798\r\nSigned-off-by: Romain Lenglet <romain@covalent.io>\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cilium/cilium/4810)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/cilium/cilium/issues/comments/404084652","html_url":"https://github.com/cilium/cilium/pull/4810#issuecomment-404084652","issue_url":"https://api.github.com/repos/cilium/cilium/issues/4810","id":404084652,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDA4NDY1Mg==","user":{"login":"rlenglet","id":126329,"node_id":"MDQ6VXNlcjEyNjMyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/126329?v=4","gravatar_id":"","url":"https://api.github.com/users/rlenglet","html_url":"https://github.com/rlenglet","followers_url":"https://api.github.com/users/rlenglet/followers","following_url":"https://api.github.com/users/rlenglet/following{/other_user}","gists_url":"https://api.github.com/users/rlenglet/gists{/gist_id}","starred_url":"https://api.github.com/users/rlenglet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlenglet/subscriptions","organizations_url":"https://api.github.com/users/rlenglet/orgs","repos_url":"https://api.github.com/users/rlenglet/repos","events_url":"https://api.github.com/users/rlenglet/events{/privacy}","received_events_url":"https://api.github.com/users/rlenglet/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T08:16:19Z","updated_at":"2018-07-11T08:16:19Z","author_association":"CONTRIBUTOR","body":"Successful CI build:\r\nhttps://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/4844/"}}
{"actor":{"display_login":"rlenglet"}}