{"action":"created","issue":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/938","repository_url":"https://api.github.com/repos/projectcalico/libcalico-go","labels_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/938/labels{/name}","comments_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/938/comments","events_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/938/events","html_url":"https://github.com/projectcalico/libcalico-go/pull/938","id":369653133,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNTQzMDAy","number":938,"title":"Bug Fix: List IPPools not defaulting blocksize properly","user":{"login":"tomdee","id":6635,"node_id":"MDQ6VXNlcjY2MzU=","avatar_url":"https://avatars2.githubusercontent.com/u/6635?v=4","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-12T18:01:33Z","updated_at":"2018-10-13T23:34:11Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/pulls/938","html_url":"https://github.com/projectcalico/libcalico-go/pull/938","diff_url":"https://github.com/projectcalico/libcalico-go/pull/938.diff","patch_url":"https://github.com/projectcalico/libcalico-go/pull/938.patch"},"body":"<!-- A few sentences describing the overall goals of the pull request's commits.\nPlease include\n- the type of fix - (e.g. bug fix, new feature, documentation)\n- some details on _why_ this PR should be merged\n- the details of the testing you've done on it (both manual and automated)\n- which components are affected by this PR\n- links to issues that this PR addresses\n-->\n\n- [ ] Tests\n- [ ] Documentation\n- [ ] Release note\n\n<!-- Writing a release note:\n- By default, no release note action is required.\n- If you're unsure whether or not your PR needs a note, ask your reviewer for guidance.\n- If this PR requires a release note, update the block below to include a concise note describing\n  the change and any important impacts this PR may have.\n-->\n\n```release-note\nNone required\n```\n\nThis affects upgrades from previous versions and was hit when trying to\nallocate an IP (post upgrade) using CNI calico-ipam plugin.\n\nI can't work out how to write an automated tests for this so I manually\ntested it:\n\nAgainst a blank etcd, I ran (using an old version pre-blocksize version\nof calicoctl)\n$ calicoctl apply -f ippool-noblock.yml\nSuccessfully applied 1 'IPPool' resource(s)\n$ ETCDCTL_API=3 etcdctl get /calico/resources/v3/projectcalico.org/ippools/my.ippool\n/calico/resources/v3/projectcalico.org/ippools/my.ippool\n{\"kind\":\"IPPool\",\"apiVersion\":\"projectcalico.org/v3\",\"metadata\":{\"name\":\"my.ippool\",\"uid\":\"575d6752-ce47-11e8-8a72-9cb6d089a923\",\"creationTimestamp\":\"2018-10-12T17:50:43Z\"},\"spec\":{\"cidr\":\"192.168.0.0/24\",\"ipipMode\":\"Never\"}}\n\nThen ran a CNI plugin without the fix, and then with the fix to verify\nthat it worked.\n$ cat test.json | CNI_PATH=/tmp CNI_NETNS=/tmp CNI_IFNAME=eth0 CNI_COMMAND=ADD CNI_CONTAINERID=tom bin/amd64/calico-ipam\n$ cat test.json\n       │ File: test.json\n   1   │ {\n   2   │   \"cniVersion\": \"0.2.0\",\n   3   │   \"name\": \"net1\",\n   4   │   \"type\": \"calico\",\n   5   │   \"log_level\": \"DEBUG\",\n   6   │   \"etcd_endpoints\": \"http://127.0.0.1:2379\",\n   7   │   \"ipam\": {\n   8   │     \"type\": \"calico-ipam\",\n   9   │     \"subnet\": \"192.168.0.0/24\"\n  10   │   }\n  11   │ }\n  12   │\n\nWithout the fix I got:\n{\n    \"code\": 100,\n    \"msg\": \"failed to request 1 IPv4 addresses. IPAM allocated only 0\"\n}\n\nWith the fix I got:\n{\n    \"cniVersion\": \"0.2.0\",\n    \"ip4\": {\n        \"ip\": \"192.168.0.192/32\"\n    },\n    \"dns\": {}\n}"},"comment":{"url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/comments/429583812","html_url":"https://github.com/projectcalico/libcalico-go/pull/938#issuecomment-429583812","issue_url":"https://api.github.com/repos/projectcalico/libcalico-go/issues/938","id":429583812,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU4MzgxMg==","user":{"login":"caseydavenport","id":1944093,"node_id":"MDQ6VXNlcjE5NDQwOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1944093?v=4","gravatar_id":"","url":"https://api.github.com/users/caseydavenport","html_url":"https://github.com/caseydavenport","followers_url":"https://api.github.com/users/caseydavenport/followers","following_url":"https://api.github.com/users/caseydavenport/following{/other_user}","gists_url":"https://api.github.com/users/caseydavenport/gists{/gist_id}","starred_url":"https://api.github.com/users/caseydavenport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseydavenport/subscriptions","organizations_url":"https://api.github.com/users/caseydavenport/orgs","repos_url":"https://api.github.com/users/caseydavenport/repos","events_url":"https://api.github.com/users/caseydavenport/events{/privacy}","received_events_url":"https://api.github.com/users/caseydavenport/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T23:34:11Z","updated_at":"2018-10-13T23:34:11Z","author_association":"MEMBER","body":"Yeah, merging this _should_ fix the release-v.3.2 branch of the node tests once it makes it to CNI: https://semaphoreci.com/calico/node/branches/release-v3-2"}}
{"actor":{"display_login":"caseydavenport"}}