{"action":"created","comment":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/comments/30203624","id":30203624,"diff_hunk":"@@ -0,0 +1,254 @@\n+package paxos","path":"ipam/paxos/paxos.go","position":1,"original_position":1,"commit_id":"183ed9821e0b81cac4536e923132a247d8fea5f8","original_commit_id":"183ed9821e0b81cac4536e923132a247d8fea5f8","user":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"body":"There are a small number of non-`camel_case` identifiers in this package, which should be turned into `camelCase`","created_at":"2015-05-13T05:36:11Z","updated_at":"2015-05-13T05:36:11Z","html_url":"https://github.com/weaveworks/weave/pull/563#discussion_r30203624","pull_request_url":"https://api.github.com/repos/weaveworks/weave/pulls/563","_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments/30203624"},"html":{"href":"https://github.com/weaveworks/weave/pull/563#discussion_r30203624"},"pull_request":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/563"}}},"pull_request":{"url":"https://api.github.com/repos/weaveworks/weave/pulls/563","id":33375617,"html_url":"https://github.com/weaveworks/weave/pull/563","diff_url":"https://github.com/weaveworks/weave/pull/563.diff","patch_url":"https://github.com/weaveworks/weave/pull/563.patch","issue_url":"https://api.github.com/repos/weaveworks/weave/issues/563","number":563,"state":"open","locked":false,"title":"IP Allocation Management","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":"Implements the scheme described at https://github.com/weaveworks/weave/wiki/IP-allocation-design, with address ranges controlled by a CRDT gossiped between peers.\r\n\r\nThe design doc on the Wiki will be deleted when this is merged.\r\n\r\nweave launch takes a new -iprange argument specifying the subnet to work within.\r\n\r\nCommands updated to take advantage of IPAM: weave run, weave start, weave attach, weave expose\r\n\r\n### Future work\r\n\r\nCurrently there is no fall-back range if you don't specify one on the command-line; it would be better to pick from a set of possibilities (checking the range is currently unused before we start using it).\r\n\r\nHow to use IPAM for WeaveDNS?  It needs its own special subnet.\r\n\r\nHow should we add support for subnets in general?\r\n\r\nWe get a bit of noise in the weave logs from containers going down, now that the weave script is calling ethtool and curl via containers. It looks like \"Container 1c5a03204b5eea3aeb6f43ece41c3f260a87329bfd89ded34ea3056826b59814 died\"\r\n\r\n~~If we hear that a container has died we should knock it out of pending?~~\r\n\r\nInterrogate Docker to check container exists and is alive at the point we assign an IP\r\n\r\n~~To lessen the chance of simultaneous election of two leaders at start-up, peers could wait for a bit to see if more peers arrive before running an election.  Also, we could look at the command-line parameters supplied to Weave, and wait longer in the case that we have been asked to connect to someone specific.~~\r\n\r\n[It would be good to move PeerName out of package router into a more\r\ncentral package so both ipam and router can depend on it.]\r\n\r\nThere is no specific logic to time-out requests such as \"give me some space\": the logic will be re-run and the request re-sent next time something else happens (e.g. it receives another request, or some\r\nperiodic gossip). This means we may send out requests more frequently than required, but this is innoccuous and it keeps things simple.  It is possible for nothing to happen, e.g. if everyone else has\r\ndisconnected.  We could have a timer to re-consider things.\r\n\r\n~~The operation to Split() one space into two, to give space to another Peer, is conceptually simple but the implementation is fiddly to maintain the various lists and limits within MutableSpace. Perhaps a different free-list implementation would make this easier.~~","created_at":"2015-04-15T17:04:47Z","updated_at":"2015-05-13T05:36:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88a05d802365f984cfe2797a2a004fa6ecac74ed","assignee":null,"milestone":{"url":"https://api.github.com/repos/weaveworks/weave/milestones/4","html_url":"https://github.com/weaveworks/weave/milestones/0.11.0","labels_url":"https://api.github.com/repos/weaveworks/weave/milestones/4/labels","id":1106531,"number":4,"title":"0.11.0","description":"","creator":{"login":"rade","id":109109,"avatar_url":"https://avatars.githubusercontent.com/u/109109?v=3","gravatar_id":"","url":"https://api.github.com/users/rade","html_url":"https://github.com/rade","followers_url":"https://api.github.com/users/rade/followers","following_url":"https://api.github.com/users/rade/following{/other_user}","gists_url":"https://api.github.com/users/rade/gists{/gist_id}","starred_url":"https://api.github.com/users/rade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rade/subscriptions","organizations_url":"https://api.github.com/users/rade/orgs","repos_url":"https://api.github.com/users/rade/repos","events_url":"https://api.github.com/users/rade/events{/privacy}","received_events_url":"https://api.github.com/users/rade/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":45,"state":"open","created_at":"2015-05-12T11:25:24Z","updated_at":"2015-05-12T13:42:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/weaveworks/weave/pulls/563/commits","review_comments_url":"https://api.github.com/repos/weaveworks/weave/pulls/563/comments","review_comment_url":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}","comments_url":"https://api.github.com/repos/weaveworks/weave/issues/563/comments","statuses_url":"https://api.github.com/repos/weaveworks/weave/statuses/183ed9821e0b81cac4536e923132a247d8fea5f8","head":{"label":"bboreham:22_ipam","ref":"22_ipam","sha":"183ed9821e0b81cac4536e923132a247d8fea5f8","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},"repo":{"id":23360369,"name":"weave","full_name":"bboreham/weave","owner":{"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},"private":false,"html_url":"https://github.com/bboreham/weave","description":"The Docker Network","fork":true,"url":"https://api.github.com/repos/bboreham/weave","forks_url":"https://api.github.com/repos/bboreham/weave/forks","keys_url":"https://api.github.com/repos/bboreham/weave/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bboreham/weave/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bboreham/weave/teams","hooks_url":"https://api.github.com/repos/bboreham/weave/hooks","issue_events_url":"https://api.github.com/repos/bboreham/weave/issues/events{/number}","events_url":"https://api.github.com/repos/bboreham/weave/events","assignees_url":"https://api.github.com/repos/bboreham/weave/assignees{/user}","branches_url":"https://api.github.com/repos/bboreham/weave/branches{/branch}","tags_url":"https://api.github.com/repos/bboreham/weave/tags","blobs_url":"https://api.github.com/repos/bboreham/weave/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bboreham/weave/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bboreham/weave/git/refs{/sha}","trees_url":"https://api.github.com/repos/bboreham/weave/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bboreham/weave/statuses/{sha}","languages_url":"https://api.github.com/repos/bboreham/weave/languages","stargazers_url":"https://api.github.com/repos/bboreham/weave/stargazers","contributors_url":"https://api.github.com/repos/bboreham/weave/contributors","subscribers_url":"https://api.github.com/repos/bboreham/weave/subscribers","subscription_url":"https://api.github.com/repos/bboreham/weave/subscription","commits_url":"https://api.github.com/repos/bboreham/weave/commits{/sha}","git_commits_url":"https://api.github.com/repos/bboreham/weave/git/commits{/sha}","comments_url":"https://api.github.com/repos/bboreham/weave/comments{/number}","issue_comment_url":"https://api.github.com/repos/bboreham/weave/issues/comments{/number}","contents_url":"https://api.github.com/repos/bboreham/weave/contents/{+path}","compare_url":"https://api.github.com/repos/bboreham/weave/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bboreham/weave/merges","archive_url":"https://api.github.com/repos/bboreham/weave/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bboreham/weave/downloads","issues_url":"https://api.github.com/repos/bboreham/weave/issues{/number}","pulls_url":"https://api.github.com/repos/bboreham/weave/pulls{/number}","milestones_url":"https://api.github.com/repos/bboreham/weave/milestones{/number}","notifications_url":"https://api.github.com/repos/bboreham/weave/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bboreham/weave/labels{/name}","releases_url":"https://api.github.com/repos/bboreham/weave/releases{/id}","created_at":"2014-08-26T17:24:12Z","updated_at":"2015-04-17T10:04:44Z","pushed_at":"2015-05-12T19:05:24Z","git_url":"git://github.com/bboreham/weave.git","ssh_url":"git@github.com:bboreham/weave.git","clone_url":"https://github.com/bboreham/weave.git","svn_url":"https://github.com/bboreham/weave","homepage":"","size":7316,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"weaveworks:master","ref":"master","sha":"9c5323ee4f0e2a90ca47ebcdcbcf17328450f2b8","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":"The Docker Network","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}","created_at":"2014-08-18T05:19:07Z","updated_at":"2015-05-13T04:19:48Z","pushed_at":"2015-05-12T19:05:24Z","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":"http://weave.works","size":10615,"stargazers_count":3271,"watchers_count":3271,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":173,"mirror_url":null,"open_issues_count":102,"forks":173,"open_issues":102,"watchers":3271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/563"},"html":{"href":"https://github.com/weaveworks/weave/pull/563"},"issue":{"href":"https://api.github.com/repos/weaveworks/weave/issues/563"},"comments":{"href":"https://api.github.com/repos/weaveworks/weave/issues/563/comments"},"review_comments":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/563/comments"},"review_comment":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/weaveworks/weave/pulls/563/commits"},"statuses":{"href":"https://api.github.com/repos/weaveworks/weave/statuses/183ed9821e0b81cac4536e923132a247d8fea5f8"}}}}