{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/20847","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/20847/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/20847/comments","events_url":"https://api.github.com/repos/docker/docker/issues/20847/events","html_url":"https://github.com/docker/docker/issues/20847","id":137774868,"number":20847,"title":"Reverse hostname lookup fails in user-defined networks with embedded DNS server","user":{"login":"dimaspivak","id":6088908,"avatar_url":"https://avatars.githubusercontent.com/u/6088908?v=3","gravatar_id":"","url":"https://api.github.com/users/dimaspivak","html_url":"https://github.com/dimaspivak","followers_url":"https://api.github.com/users/dimaspivak/followers","following_url":"https://api.github.com/users/dimaspivak/following{/other_user}","gists_url":"https://api.github.com/users/dimaspivak/gists{/gist_id}","starred_url":"https://api.github.com/users/dimaspivak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimaspivak/subscriptions","organizations_url":"https://api.github.com/users/dimaspivak/orgs","repos_url":"https://api.github.com/users/dimaspivak/repos","events_url":"https://api.github.com/users/dimaspivak/events{/privacy}","received_events_url":"https://api.github.com/users/dimaspivak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/networking","name":"group/networking","color":"F6FBFF"}],"state":"closed","locked":false,"assignee":{"login":"sanimej","id":10071849,"avatar_url":"https://avatars.githubusercontent.com/u/10071849?v=3","gravatar_id":"","url":"https://api.github.com/users/sanimej","html_url":"https://github.com/sanimej","followers_url":"https://api.github.com/users/sanimej/followers","following_url":"https://api.github.com/users/sanimej/following{/other_user}","gists_url":"https://api.github.com/users/sanimej/gists{/gist_id}","starred_url":"https://api.github.com/users/sanimej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanimej/subscriptions","organizations_url":"https://api.github.com/users/sanimej/orgs","repos_url":"https://api.github.com/users/sanimej/repos","events_url":"https://api.github.com/users/sanimej/events{/privacy}","received_events_url":"https://api.github.com/users/sanimej/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/49","html_url":"https://github.com/docker/docker/milestones/1.11.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/49/labels","id":1529231,"number":49,"title":"1.11.0","description":"Code freeze / feature freeze 22 March 2016\r\nPlanned release: 12 April 2016\r\n\r\nhttps://github.com/docker/docker/wiki/Engine-1.11.0","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":165,"state":"open","created_at":"2016-01-21T01:33:46Z","updated_at":"2016-03-27T15:24:49Z","due_on":"2016-04-11T07:00:00Z","closed_at":null},"comments":16,"created_at":"2016-03-02T05:07:57Z","updated_at":"2016-03-28T03:19:54Z","closed_at":"2016-03-10T03:27:37Z","body":"Output of `docker version`:\r\n\r\n```\r\nClient:\r\n Version:      1.10.2\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   c3959b1\r\n Built:        Mon Feb 22 21:37:01 2016\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.10.2\r\n API version:  1.22\r\n Go version:   go1.5.3\r\n Git commit:   c3959b1\r\n Built:        Mon Feb 22 21:37:01 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n\r\nOutput of `docker info`:\r\n\r\n```\r\nContainers: 10\r\n Running: 8\r\n Paused: 0\r\n Stopped: 2\r\nImages: 40\r\nServer Version: 1.10.2\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 60\r\n Dirperm1 Supported: false\r\nExecution Driver: native-0.2\r\nLogging Driver: json-file\r\nPlugins: \r\n Volume: local\r\n Network: null host bridge\r\nKernel Version: 3.13.0-24-generic\r\nOperating System: Ubuntu 14.04 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 8\r\nTotal Memory: 29.4 GiB\r\nName: myhostname.myemployer.com\r\nID: PO2A:QS2L:UA3R:FCYP:W452:DCSQ:OTGJ:EJSX:XYNI:RUTR:KAHK:NU35\r\nWARNING: No swap limit support\r\n```\r\n\r\nProvide additional environment details (AWS, VirtualBox, physical, etc.):\r\nHave reproduced this on physical systems and AWS.\r\n\r\n\r\nList the steps to reproduce the issue:\r\n1. Create a user-defined bridge network with `docker network create ...`. For this example, I called mine \"blahnetwork.\"\r\n2. Start a Docker container in daemon mode, attaching it to the network, with /sbin/init. As an example:\r\n```\r\ndocker run docker run -d --net=blahnetwork --net-alias=blah --hostname=blah centos:6.6 /sbin/init\r\n```\r\nThis creates a container reachable within `blahnetwork` with the alias `blah`.\r\n3. Use `docker inspect` to find out the IP address of this daemon container within `blahnetwork`. I got `192.168.124.6`.\r\n4. Test forward name resolution of containers in this network using the `host` utility:\r\n```\r\ndocker run --net=blahnetwork centos:6.6 host blah\r\nblah has address 192.168.124.6\r\nHost blah not found: 3(NXDOMAIN)\r\nHost blah not found: 3(NXDOMAIN)\r\n```\r\n5. That worked. Now test reverse resolution:\r\n```\r\ndocker run --net=blahnetwork centos:6.6 host 192.168.124.6\r\nHost 6.124.168.192.in-addr.arpa. not found: 3(NXDOMAIN)\r\n```\r\n\r\nDescribe the results you received:\r\nUsing just the embedded Docker daemon's DNS in 1.10, forward name resolution works great. Reverse name resolution fails, though.\r\n\r\nDescribe the results you expected:\r\nI'd expect reverse resolution to work. A simple workaround of specifying each container's DNS server by passing the IP address of a separate daemon container running dnsmasq gives the expected behavior.\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/202216012","html_url":"https://github.com/docker/docker/issues/20847#issuecomment-202216012","issue_url":"https://api.github.com/repos/docker/docker/issues/20847","id":202216012,"user":{"login":"dimaspivak","id":6088908,"avatar_url":"https://avatars.githubusercontent.com/u/6088908?v=3","gravatar_id":"","url":"https://api.github.com/users/dimaspivak","html_url":"https://github.com/dimaspivak","followers_url":"https://api.github.com/users/dimaspivak/followers","following_url":"https://api.github.com/users/dimaspivak/following{/other_user}","gists_url":"https://api.github.com/users/dimaspivak/gists{/gist_id}","starred_url":"https://api.github.com/users/dimaspivak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimaspivak/subscriptions","organizations_url":"https://api.github.com/users/dimaspivak/orgs","repos_url":"https://api.github.com/users/dimaspivak/repos","events_url":"https://api.github.com/users/dimaspivak/events{/privacy}","received_events_url":"https://api.github.com/users/dimaspivak/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T03:19:54Z","updated_at":"2016-03-28T03:19:54Z","body":"(Though, FWIW, if you supply a container name as you're doing here, @F21, it's by design that the container name is used for reverse DNS. This issue was related to cases of where container names aren't supplied, only network aliases.)"}}