{"action":"created","issue":{"url":"https://api.github.com/repos/weaveworks/mesh/issues/28","repository_url":"https://api.github.com/repos/weaveworks/mesh","labels_url":"https://api.github.com/repos/weaveworks/mesh/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/weaveworks/mesh/issues/28/comments","events_url":"https://api.github.com/repos/weaveworks/mesh/issues/28/events","html_url":"https://github.com/weaveworks/mesh/issues/28","id":142423199,"number":28,"title":"LocalConnection.registerRemote() overwrites newly-received Peer UID ","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T17:55:37Z","updated_at":"2016-03-21T18:29:45Z","closed_at":null,"body":"At https://github.com/weaveworks/mesh/blob/master/connection.go#L194, the incoming UID is parsed into `remote`, but `registerRemote()` ignores this UID and looks up the peer by name.\r\n\r\nIf the peer has restarted and reconnected, this has the effect of overwriting the new info with the old peer's info, so for instance `LocalPeer.handleAddConnection()` will see it as an existing peer and not send the initial gossip to it, thus leaving it ignorant of current topology, DNS and IPAM data."},"comment":{"url":"https://api.github.com/repos/weaveworks/mesh/issues/comments/199415246","html_url":"https://github.com/weaveworks/mesh/issues/28#issuecomment-199415246","issue_url":"https://api.github.com/repos/weaveworks/mesh/issues/28","id":199415246,"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},"created_at":"2016-03-21T18:29:45Z","updated_at":"2016-03-21T18:29:45Z","body":"> If the peer has restarted and reconnected, this has the effect of overwriting the new info with the old peer's info,\r\n\r\nThat really isn't a problem, and I suspect fixing it would require major surgery.\r\n\r\n> `LocalPeer.handleAddConnection()` will see it as an existing peer and not send the initial gossip to it.\r\n\r\n*That* is a problem."}}