{"action":"created","issue":{"url":"https://api.github.com/repos/projectcalico/calico-containers/issues/802","repository_url":"https://api.github.com/repos/projectcalico/calico-containers","labels_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/802/labels{/name}","comments_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/802/comments","events_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/802/events","html_url":"https://github.com/projectcalico/calico-containers/issues/802","id":131795380,"number":802,"title":"Calicoctl Pool allows overlapping pools to be programmed","user":{"login":"TrimBiggs","id":1302077,"avatar_url":"https://avatars.githubusercontent.com/u/1302077?v=3","gravatar_id":"","url":"https://api.github.com/users/TrimBiggs","html_url":"https://github.com/TrimBiggs","followers_url":"https://api.github.com/users/TrimBiggs/followers","following_url":"https://api.github.com/users/TrimBiggs/following{/other_user}","gists_url":"https://api.github.com/users/TrimBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/TrimBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrimBiggs/subscriptions","organizations_url":"https://api.github.com/users/TrimBiggs/orgs","repos_url":"https://api.github.com/users/TrimBiggs/repos","events_url":"https://api.github.com/users/TrimBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/TrimBiggs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/projectcalico/calico-containers/labels/Priority:%20Medium","name":"Priority: Medium","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"TrimBiggs","id":1302077,"avatar_url":"https://avatars.githubusercontent.com/u/1302077?v=3","gravatar_id":"","url":"https://api.github.com/users/TrimBiggs","html_url":"https://github.com/TrimBiggs","followers_url":"https://api.github.com/users/TrimBiggs/followers","following_url":"https://api.github.com/users/TrimBiggs/following{/other_user}","gists_url":"https://api.github.com/users/TrimBiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/TrimBiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrimBiggs/subscriptions","organizations_url":"https://api.github.com/users/TrimBiggs/orgs","repos_url":"https://api.github.com/users/TrimBiggs/repos","events_url":"https://api.github.com/users/TrimBiggs/events{/privacy}","received_events_url":"https://api.github.com/users/TrimBiggs/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-02-06T00:15:47Z","updated_at":"2016-03-14T18:06:20Z","closed_at":null,"body":"This currently allows you to program pools such as:\r\n```\r\n+----------------+---------+\r\n|   IPv4 CIDR    | Options |\r\n+----------------+---------+\r\n| 10.10.10.0/24  |         |\r\n| 10.10.10.0/25  |         |\r\n| 10.10.10.0/26  |         |\r\n+----------------+---------+\r\n```\r\n\r\nWe currently reject all overlapping ranges in the `ip_pool_range_add` function called by `calicoctl pool range add <cidr_start> <cidr_end>`, but not in `ip_pool_add`.\r\n\r\nPools now must start/end at a `/26` prefix, meaning that any cider net smaller than `/26` is not allowed.  So any overlapping pool that is programmed either fully encapsulates the preprogrammed cidr or is fully encapsulated by the preprogrammed cidr.\r\n\r\nIf a new pool fully encapsulates another pool (such as adding `10.10.0.0/16` when `10.10.10.0/24` exists), we should either\r\n- reject it\r\n- remove old pool and accept new pool (this will require some changes to backend)\r\n- add the not yet programmed remaining cidr(s) as separate pool(s)\r\n\r\nIf a new pool falls within an existing pool (such as adding `10.10.10.0/24` when `10.10.0.0/16` exists), just reject it. "},"comment":{"url":"https://api.github.com/repos/projectcalico/calico-containers/issues/comments/196447133","html_url":"https://github.com/projectcalico/calico-containers/issues/802#issuecomment-196447133","issue_url":"https://api.github.com/repos/projectcalico/calico-containers/issues/802","id":196447133,"user":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T18:06:19Z","updated_at":"2016-03-14T18:06:19Z","body":"The problem is just with restricting the pool size - which is issue didn't introduce. So no relation. Nothing to see here. Carry on."}}