{"action":"created","issue":{"url":"https://api.github.com/repos/docker/libnetwork/issues/702","labels_url":"https://api.github.com/repos/docker/libnetwork/issues/702/labels{/name}","comments_url":"https://api.github.com/repos/docker/libnetwork/issues/702/comments","events_url":"https://api.github.com/repos/docker/libnetwork/issues/702/events","html_url":"https://github.com/docker/libnetwork/pull/702","id":113064887,"number":702,"title":"Avoid duplicate entries in /etc/hosts","user":{"login":"mrjana","id":1693482,"avatar_url":"https://avatars.githubusercontent.com/u/1693482?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjana","html_url":"https://github.com/mrjana","followers_url":"https://api.github.com/users/mrjana/followers","following_url":"https://api.github.com/users/mrjana/following{/other_user}","gists_url":"https://api.github.com/users/mrjana/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjana/subscriptions","organizations_url":"https://api.github.com/users/mrjana/orgs","repos_url":"https://api.github.com/users/mrjana/repos","events_url":"https://api.github.com/users/mrjana/events{/privacy}","received_events_url":"https://api.github.com/users/mrjana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-23T17:33:50Z","updated_at":"2015-10-24T00:59:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/libnetwork/pulls/702","html_url":"https://github.com/docker/libnetwork/pull/702","diff_url":"https://github.com/docker/libnetwork/pull/702.diff","patch_url":"https://github.com/docker/libnetwork/pull/702.patch"},"body":"Currently the local containers of a global scope\r\nnetwork will get it's service records updated\r\nfrom both a local update and global update. There\r\nis no way to check if this is a local endpoint when\r\na remote update comes in via watch because we add\r\nthe endpoint to local endpoint list during join, while\r\nthe remote update happens during createendpoint.\r\n\r\nThe right thing to do is update the local endpoint list\r\nand start watching during createndpoint and remove the watch\r\nduring delete endpoint. But this might result in the container\r\ngetting it's own record in it's /etc/hosts. So added a filtering\r\nlogic to filter out self records when updating the container's\r\n/etc/hosts\r\n\r\nSigned-off-by: Jana Radhakrishnan <mrjana@docker.com>"},"comment":{"url":"https://api.github.com/repos/docker/libnetwork/issues/comments/150730028","html_url":"https://github.com/docker/libnetwork/pull/702#issuecomment-150730028","issue_url":"https://api.github.com/repos/docker/libnetwork/issues/702","id":150730028,"user":{"login":"mavenugo","id":5056191,"avatar_url":"https://avatars.githubusercontent.com/u/5056191?v=3","gravatar_id":"","url":"https://api.github.com/users/mavenugo","html_url":"https://github.com/mavenugo","followers_url":"https://api.github.com/users/mavenugo/followers","following_url":"https://api.github.com/users/mavenugo/following{/other_user}","gists_url":"https://api.github.com/users/mavenugo/gists{/gist_id}","starred_url":"https://api.github.com/users/mavenugo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavenugo/subscriptions","organizations_url":"https://api.github.com/users/mavenugo/orgs","repos_url":"https://api.github.com/users/mavenugo/repos","events_url":"https://api.github.com/users/mavenugo/events{/privacy}","received_events_url":"https://api.github.com/users/mavenugo/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T00:59:40Z","updated_at":"2015-10-24T00:59:40Z","body":"thanks @mrjana. LGTM"}}