{"action":"created","issue":{"url":"https://api.github.com/repos/docker/notary/issues/753","repository_url":"https://api.github.com/repos/docker/notary","labels_url":"https://api.github.com/repos/docker/notary/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/docker/notary/issues/753/comments","events_url":"https://api.github.com/repos/docker/notary/issues/753/events","html_url":"https://github.com/docker/notary/pull/753","id":155817424,"number":753,"title":"force cgo resolver for name resolution","user":{"login":"andrewhsu","id":57640,"avatar_url":"https://avatars.githubusercontent.com/u/57640?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewhsu","html_url":"https://github.com/andrewhsu","followers_url":"https://api.github.com/users/andrewhsu/followers","following_url":"https://api.github.com/users/andrewhsu/following{/other_user}","gists_url":"https://api.github.com/users/andrewhsu/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewhsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewhsu/subscriptions","organizations_url":"https://api.github.com/users/andrewhsu/orgs","repos_url":"https://api.github.com/users/andrewhsu/repos","events_url":"https://api.github.com/users/andrewhsu/events{/privacy}","received_events_url":"https://api.github.com/users/andrewhsu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/notary/labels/status/0-triage","name":"status/0-triage","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-05-19T19:36:23Z","updated_at":"2016-07-07T18:03:03Z","closed_at":"2016-05-24T19:09:53Z","pull_request":{"url":"https://api.github.com/repos/docker/notary/pulls/753","html_url":"https://github.com/docker/notary/pull/753","diff_url":"https://github.com/docker/notary/pull/753.diff","patch_url":"https://github.com/docker/notary/pull/753.patch"},"body":"By default, the pure Go resolver is used which makes direct DNS\r\nrequests first to resolve a hostname before checking /etc/hosts.\r\nIf a host on the network has the same name as the linked container,\r\nthe host on the network will be used instead of the linked container.\r\n\r\nI had a machine on the network with hostname `mysql` and bringing up the containers with `docker-compose` had the `server` and `signer` linked containers trying to connect to to it...\r\n\r\n```\r\n$ sudo docker-compose up\r\n...\r\nmysql_1  | 2016-05-19 19:33:29 140622360905664 [Note] mysqld: ready for connections.\r\nmysql_1  | Version: '10.1.10-MariaDB-1~jessie'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution\r\nserver_1 | waiting for notarymysql to come up.\r\nsigner_1 | waiting for notarymysql to come up.\r\nserver_1 | waiting for notarymysql to come up.\r\nsigner_1 | waiting for notarymysql to come up.\r\nserver_1 | waiting for notarymysql to come up.\r\n...\r\n```\r\n\r\nForcing cgo resolver will use C library routines that will honor\r\nvalues in /etc/hosts first and then fall back on DNS.\r\n\r\nFrom the docs: https://golang.org/pkg/net/#hdr-Name_Resolution\r\n\r\nSigned-off-by: Andrew Hsu andrewhsu@acm.org (github: andrewhsu)"},"comment":{"url":"https://api.github.com/repos/docker/notary/issues/comments/231159100","html_url":"https://github.com/docker/notary/pull/753#issuecomment-231159100","issue_url":"https://api.github.com/repos/docker/notary/issues/753","id":231159100,"user":{"login":"cyli","id":223200,"avatar_url":"https://avatars.githubusercontent.com/u/223200?v=3","gravatar_id":"","url":"https://api.github.com/users/cyli","html_url":"https://github.com/cyli","followers_url":"https://api.github.com/users/cyli/followers","following_url":"https://api.github.com/users/cyli/following{/other_user}","gists_url":"https://api.github.com/users/cyli/gists{/gist_id}","starred_url":"https://api.github.com/users/cyli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyli/subscriptions","organizations_url":"https://api.github.com/users/cyli/orgs","repos_url":"https://api.github.com/users/cyli/repos","events_url":"https://api.github.com/users/cyli/events{/privacy}","received_events_url":"https://api.github.com/users/cyli/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T18:03:03Z","updated_at":"2016-07-07T18:03:03Z","body":"Ah ok, thanks for clarifying and trying to replicate!\n\nOn Thursday, July 7, 2016, Andrew Hsu <notifications@github.com> wrote:\n\n> @cyli <https://github.com/cyli> no i did not have 2 dns servers on the\n> host at the time. Outside of docker containers on the host I had entries\n> something like this in /etc/resolv.conf:\n>\n> search internal.example.com\n> nameserver 10.0.0.1\n> nameserver 10.0.0.2\n>\n> And running our own DNS servers resolves hostnames like this:\n>\n> bash$ host mysqlmysql.internal.example.com has address 10.10.10.5\n>\n>\n> In any case, I tried to replicate the issue again after moving my entire development environment from Kitematic to the new Docker for Mac OS X 1.12.0-rc2-beta16 and I was not able to get it to fail like before so I'm not going to spend any more time on it. Stuff works.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/docker/notary/pull/753#issuecomment-231110375>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe/AANn4PBau7RBlOc9LdGAHhpg1_Rh7Ms_ks5qTRjygaJpZM4IimJO>\n> .\n>\n"}}
{"actor":{"display_login":"cyli"}}