{"action":"created","issue":{"url":"https://api.github.com/repos/rthalley/dnspython/issues/219","repository_url":"https://api.github.com/repos/rthalley/dnspython","labels_url":"https://api.github.com/repos/rthalley/dnspython/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/rthalley/dnspython/issues/219/comments","events_url":"https://api.github.com/repos/rthalley/dnspython/issues/219/events","html_url":"https://github.com/rthalley/dnspython/issues/219","id":193612448,"number":219,"title":"Docker embedded DNS server","user":{"login":"kooba","id":243257,"avatar_url":"https://avatars.githubusercontent.com/u/243257?v=3","gravatar_id":"","url":"https://api.github.com/users/kooba","html_url":"https://github.com/kooba","followers_url":"https://api.github.com/users/kooba/followers","following_url":"https://api.github.com/users/kooba/following{/other_user}","gists_url":"https://api.github.com/users/kooba/gists{/gist_id}","starred_url":"https://api.github.com/users/kooba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kooba/subscriptions","organizations_url":"https://api.github.com/users/kooba/orgs","repos_url":"https://api.github.com/users/kooba/repos","events_url":"https://api.github.com/users/kooba/events{/privacy}","received_events_url":"https://api.github.com/users/kooba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-05T21:17:11Z","updated_at":"2016-12-09T15:14:24Z","closed_at":null,"body":"I'm having issue with docker container name resolution when using dnspython. Issue seems to be only there when `search` is set in `/etc/resolv.conf`\r\n\r\nDocker embedded DNS server allows unlinked containers to be resolved just by their name. \r\n\r\nI've created gist that can be used to reproduce the problem:\r\nhttps://gist.github.com/kooba/c464f7e33056cb0ad37edcbe43bb0da0\r\n\r\nThis can be run with `docker-compose up`\r\n\r\nExpected results in stdout are:\r\n```\r\n### socket example ###\r\n172.19.0.2\r\n### dnspython example ###\r\n172.19.0.2\r\n```\r\n\r\ngetting:\r\n```\r\n### socket example ###\r\n172.19.0.2\r\n### dnspython example ###\r\nTraceback (most recent call last):\r\n  File \"/var/tmp/test.py\", line 19, in <module>\r\n    answers = resolver.query(service_url)\r\n  File \"/usr/local/lib/python3.4/site-packages/dns/resolver.py\", line 1051, in query\r\n    raise NXDOMAIN(qnames=qnames_to_try, responses=nxdomain_responses)\r\ndns.resolver.NXDOMAIN: The DNS query name does not exist: test-service.foo.example.com.\r\n```\r\n\r\nAny help would be greatly appreciated."},"comment":{"url":"https://api.github.com/repos/rthalley/dnspython/issues/comments/266037450","html_url":"https://github.com/rthalley/dnspython/issues/219#issuecomment-266037450","issue_url":"https://api.github.com/repos/rthalley/dnspython/issues/219","id":266037450,"user":{"login":"kooba","id":243257,"avatar_url":"https://avatars.githubusercontent.com/u/243257?v=3","gravatar_id":"","url":"https://api.github.com/users/kooba","html_url":"https://github.com/kooba","followers_url":"https://api.github.com/users/kooba/followers","following_url":"https://api.github.com/users/kooba/following{/other_user}","gists_url":"https://api.github.com/users/kooba/gists{/gist_id}","starred_url":"https://api.github.com/users/kooba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kooba/subscriptions","organizations_url":"https://api.github.com/users/kooba/orgs","repos_url":"https://api.github.com/users/kooba/repos","events_url":"https://api.github.com/users/kooba/events{/privacy}","received_events_url":"https://api.github.com/users/kooba/received_events","type":"User","site_admin":false},"created_at":"2016-12-09T15:14:24Z","updated_at":"2016-12-09T15:14:24Z","body":"Hi `/etc/resolv.conf` is:\r\n\r\n```\r\nsearch foo.example.com\r\nnameserver 127.0.0.11\r\noptions ndots:0\r\n```\r\n\r\n`test-service.foo.example.com` is not resolvable but I expected that `test-service` will be first looked up in `127.0.0.11` which would resolve it. I guess `test-service` is not treated as fully qualified domain and `search` is used instead?\r\n\r\nThe workaround I was able to implement was to add `.` after the url so `test-service.` would be treated as a fully qualified domain. That fixed it. Just not sure if that's desired behaviour. \r\n\r\n\r\n"}}
{"actor":{"display_login":"kooba"}}