{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/comments/100849442","pull_request_review_id":21565883,"id":100849442,"diff_hunk":"@@ -76,13 +76,20 @@ type Allocator struct {\n \tnow               func() time.Time\n }\n \n+type PreClaim struct {\n+\tIdent       string\n+\tIsContainer bool","path":"ipam/allocator.go","position":null,"original_position":6,"commit_id":"4e37f5ec4213c0129bda2cdcc8e1b61e9066344e","original_commit_id":"293abd953eb3298177e494e52bfeba2ce085660f","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"Have added some comments documenting this and related fields","created_at":"2017-02-13T17:31:49Z","updated_at":"2017-02-13T17:31:49Z","html_url":"https://github.com/weaveworks/weave/pull/2787#discussion_r100849442","pull_request_url":"https://api.github.com/repos/weaveworks/weave/pulls/2787","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments/100849442"},"html":{"href":"https://github.com/weaveworks/weave/pull/2787#discussion_r100849442"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/2787"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/2787","id":105515555,"html_url":"https://github.com/weaveworks/weave/pull/2787","diff_url":"https://github.com/weaveworks/weave/pull/2787.diff","patch_url":"https://github.com/weaveworks/weave/pull/2787.patch","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/2787","number":2787,"state":"open","locked":false,"title":"Claim existing IP addresses at startup with no race condition","user":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"body":"Fixes #2784 \r\n\r\n`reclaim.go` is a re-implementation of the `launch.sh` code to claim addresses in Go.\r\nWe already had a `pendingClaims` list in IPAM, so we simply pre-populate this with entries for each existing address.  The claims will be processed as soon as the ring is known.\r\n\r\nAs it stands, this code is only good enough for `weave-kube`, not for `weave launch`\r\nThe code to find existing IPs works through the process table, and thus we do not have the Docker container ID.  To resolve that I propose to add another loop to go through Docker container IDs if we have a Docker API connection.","created_at":"2017-02-09T21:19:20Z","updated_at":"2017-02-13T17:31:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12f7f07f307ccec7d2d68fa9498a8f2a892aac5a","assignee":{"login":"brb","id":122571,"avatar_url":"https://avatars.githubusercontent.com/u/122571?v=3","gravatar_id":"","url":"https://api.github.com/users/brb","html_url":"https://github.com/brb","followers_url":"https://api.github.com/users/brb/followers","following_url":"https://api.github.com/users/brb/following{/other_user}","gists_url":"https://api.github.com/users/brb/gists{/gist_id}","starred_url":"https://api.github.com/users/brb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brb/subscriptions","organizations_url":"https://api.github.com/users/brb/orgs","repos_url":"https://api.github.com/users/brb/repos","events_url":"https://api.github.com/users/brb/events{/privacy}","received_events_url":"https://api.github.com/users/brb/received_events","type":"User","site_admin":false},"assignees":[{"login":"brb","id":122571,"avatar_url":"https://avatars.githubusercontent.com/u/122571?v=3","gravatar_id":"","url":"https://api.github.com/users/brb","html_url":"https://github.com/brb","followers_url":"https://api.github.com/users/brb/followers","following_url":"https://api.github.com/users/brb/following{/other_user}","gists_url":"https://api.github.com/users/brb/gists{/gist_id}","starred_url":"https://api.github.com/users/brb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brb/subscriptions","organizations_url":"https://api.github.com/users/brb/orgs","repos_url":"https://api.github.com/users/brb/repos","events_url":"https://api.github.com/users/brb/events{/privacy}","received_events_url":"https://api.github.com/users/brb/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/weaveworks/weave/milestones/50","html_url":"https://github.com/weaveworks/weave/milestone/50","labels_url":"https://api.github.com/repos/weaveworks/weave/milestones/50/labels","id":2292247,"number":50,"title":"1.9.1","description":"","creator":{"login":"bboreham","id":8125524,"avatar_url":"https://avatars.githubusercontent.com/u/8125524?v=3","gravatar_id":"","url":"https://api.github.com/users/bboreham","html_url":"https://github.com/bboreham","followers_url":"https://api.github.com/users/bboreham/followers","following_url":"https://api.github.com/users/bboreham/following{/other_user}","gists_url":"https://api.github.com/users/bboreham/gists{/gist_id}","starred_url":"https://api.github.com/users/bboreham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bboreham/subscriptions","organizations_url":"https://api.github.com/users/bboreham/orgs","repos_url":"https://api.github.com/users/bboreham/repos","events_url":"https://api.github.com/users/bboreham/events{/privacy}","received_events_url":"https://api.github.com/users/bboreham/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":7,"state":"open","created_at":"2017-02-01T12:52:04Z","updated_at":"2017-02-13T15:49:25Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/weaveworks/weave/pulls/2787/commits","review_comments_url":"https://api.github.com/repos/weaveworks/weave/pulls/2787/comments","review_comment_url":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/2787/comments","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/4e37f5ec4213c0129bda2cdcc8e1b61e9066344e","head":{"label":"weaveworks:issues/2784-preclaim-addresses","ref":"issues/2784-preclaim-addresses","sha":"4e37f5ec4213c0129bda2cdcc8e1b61e9066344e","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":23059575,"name":"weave","full_name":"weaveworks/weave","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/weave","description":"Simple, resilient multi-host Docker networking and more.","fork":false,"url":"https://api.github.com/repos/weaveworks/weave","forks_url":"https://api.github.com/repos/weaveworks/weave/forks","keys_url":"https://api.github.com/repos/weaveworks/weave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/weave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/weave/teams","hooks_url":"https://api.github.com/repos/weaveworks/weave/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/weave/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/weave/events","assignees_url":"https://api.github.com/repos/weaveworks/weave/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/weave/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/weave/tags","blobs_url":"https://api.github.com/repos/weaveworks/weave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/weave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/weave/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/weave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/weave/languages","stargazers_url":"https://api.github.com/repos/weaveworks/weave/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/weave/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/weave/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/weave/subscription","commits_url":"https://api.github.com/repos/weaveworks/weave/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/weave/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/weave/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/weave/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/weave/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/weave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/weave/merges","archive_url":"https://api.github.com/repos/weaveworks/weave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/weave/downloads","issues_url":"https://api.github.com/repos/weaveworks/weave/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/weave/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/weave/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/weave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/weave/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/weave/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/weave/deployments","created_at":"2014-08-18T05:19:07Z","updated_at":"2017-02-11T15:21:36Z","pushed_at":"2017-02-13T17:31:26Z","git_url":"git://github.com/weaveworks/weave.git","ssh_url":"git@github.com:weaveworks/weave.git","clone_url":"https://github.com/weaveworks/weave.git","svn_url":"https://github.com/weaveworks/weave","homepage":"https://www.weave.works","size":8327,"stargazers_count":4536,"watchers_count":4536,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"open_issues_count":324,"forks":334,"open_issues":324,"watchers":4536,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"50b1aa0c74835cc7dd96394bfd22200e4257e8b2","user":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"repo":{"id":23059575,"name":"weave","full_name":"weaveworks/weave","owner":{"login":"weaveworks","id":9976052,"avatar_url":"https://avatars.githubusercontent.com/u/9976052?v=3","gravatar_id":"","url":"https://api.github.com/users/weaveworks","html_url":"https://github.com/weaveworks","followers_url":"https://api.github.com/users/weaveworks/followers","following_url":"https://api.github.com/users/weaveworks/following{/other_user}","gists_url":"https://api.github.com/users/weaveworks/gists{/gist_id}","starred_url":"https://api.github.com/users/weaveworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weaveworks/subscriptions","organizations_url":"https://api.github.com/users/weaveworks/orgs","repos_url":"https://api.github.com/users/weaveworks/repos","events_url":"https://api.github.com/users/weaveworks/events{/privacy}","received_events_url":"https://api.github.com/users/weaveworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/weaveworks/weave","description":"Simple, resilient multi-host Docker networking and more.","fork":false,"url":"https://api.github.com/repos/weaveworks/weave","forks_url":"https://api.github.com/repos/weaveworks/weave/forks","keys_url":"https://api.github.com/repos/weaveworks/weave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weaveworks/weave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weaveworks/weave/teams","hooks_url":"https://api.github.com/repos/weaveworks/weave/hooks","issue_events_url":"https://api.github.com/repos/weaveworks/weave/issues/events{/number}","events_url":"https://api.github.com/repos/weaveworks/weave/events","assignees_url":"https://api.github.com/repos/weaveworks/weave/assignees{/user}","branches_url":"https://api.github.com/repos/weaveworks/weave/branches{/branch}","tags_url":"https://api.github.com/repos/weaveworks/weave/tags","blobs_url":"https://api.github.com/repos/weaveworks/weave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weaveworks/weave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weaveworks/weave/git/refs{/sha}","trees_url":"https://api.github.com/repos/weaveworks/weave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/{sha}","languages_url":"https://api.github.com/repos/weaveworks/weave/languages","stargazers_url":"https://api.github.com/repos/weaveworks/weave/stargazers","contributors_url":"https://api.github.com/repos/weaveworks/weave/contributors","subscribers_url":"https://api.github.com/repos/weaveworks/weave/subscribers","subscription_url":"https://api.github.com/repos/weaveworks/weave/subscription","commits_url":"https://api.github.com/repos/weaveworks/weave/commits{/sha}","git_commits_url":"https://api.github.com/repos/weaveworks/weave/git/commits{/sha}","comments_url":"https://api.github.com/repos/weaveworks/weave/comments{/number}","issue_comment_url":"https://api.github.com/repos/weaveworks/weave/issues/comments{/number}","contents_url":"https://api.github.com/repos/weaveworks/weave/contents/{+path}","compare_url":"https://api.github.com/repos/weaveworks/weave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weaveworks/weave/merges","archive_url":"https://api.github.com/repos/weaveworks/weave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weaveworks/weave/downloads","issues_url":"https://api.github.com/repos/weaveworks/weave/issues{/number}","pulls_url":"https://api.github.com/repos/weaveworks/weave/pulls{/number}","milestones_url":"https://api.github.com/repos/weaveworks/weave/milestones{/number}","notifications_url":"https://api.github.com/repos/weaveworks/weave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weaveworks/weave/labels{/name}","releases_url":"https://api.github.com/repos/weaveworks/weave/releases{/id}","deployments_url":"https://api.github.com/repos/weaveworks/weave/deployments","created_at":"2014-08-18T05:19:07Z","updated_at":"2017-02-11T15:21:36Z","pushed_at":"2017-02-13T17:31:26Z","git_url":"git://github.com/weaveworks/weave.git","ssh_url":"git@github.com:weaveworks/weave.git","clone_url":"https://github.com/weaveworks/weave.git","svn_url":"https://github.com/weaveworks/weave","homepage":"https://www.weave.works","size":8327,"stargazers_count":4536,"watchers_count":4536,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"open_issues_count":324,"forks":334,"open_issues":324,"watchers":4536,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/2787"},"html":{"href":"https://github.com/weaveworks/weave/pull/2787"},"issue":{"href":"https://api.github.com/repos/weaveworks/weave/issues/2787"},"comments":{"href":"https://api.github.com/repos/weaveworks/weave/issues/2787/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/2787/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/2787/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/weave/statuses/4e37f5ec4213c0129bda2cdcc8e1b61e9066344e"}}}}
{"actor":{"display_login":"bboreham"}}