{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/251","labels_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/251/comments","events_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/251/events","html_url":"https://github.com/mesosphere/mesos-dns/pull/251","id":105448995,"number":251,"title":"Allow hostnames for delegate resolvers","user":{"login":"karlkfi","id":3980984,"avatar_url":"https://avatars.githubusercontent.com/u/3980984?v=3","gravatar_id":"","url":"https://api.github.com/users/karlkfi","html_url":"https://github.com/karlkfi","followers_url":"https://api.github.com/users/karlkfi/followers","following_url":"https://api.github.com/users/karlkfi/following{/other_user}","gists_url":"https://api.github.com/users/karlkfi/gists{/gist_id}","starred_url":"https://api.github.com/users/karlkfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlkfi/subscriptions","organizations_url":"https://api.github.com/users/karlkfi/orgs","repos_url":"https://api.github.com/users/karlkfi/repos","events_url":"https://api.github.com/users/karlkfi/events{/privacy}","received_events_url":"https://api.github.com/users/karlkfi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mesosphere/mesos-dns/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/mesosphere/mesos-dns/labels/PTAL","name":"PTAL","color":"00ff00"}],"state":"open","locked":false,"assignee":{"login":"karlkfi","id":3980984,"avatar_url":"https://avatars.githubusercontent.com/u/3980984?v=3","gravatar_id":"","url":"https://api.github.com/users/karlkfi","html_url":"https://github.com/karlkfi","followers_url":"https://api.github.com/users/karlkfi/followers","following_url":"https://api.github.com/users/karlkfi/following{/other_user}","gists_url":"https://api.github.com/users/karlkfi/gists{/gist_id}","starred_url":"https://api.github.com/users/karlkfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlkfi/subscriptions","organizations_url":"https://api.github.com/users/karlkfi/orgs","repos_url":"https://api.github.com/users/karlkfi/repos","events_url":"https://api.github.com/users/karlkfi/events{/privacy}","received_events_url":"https://api.github.com/users/karlkfi/received_events","type":"User","site_admin":false},"milestone":null,"comments":24,"created_at":"2015-09-08T19:02:17Z","updated_at":"2015-09-08T22:29:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/pulls/251","html_url":"https://github.com/mesosphere/mesos-dns/pull/251","diff_url":"https://github.com/mesosphere/mesos-dns/pull/251.diff","patch_url":"https://github.com/mesosphere/mesos-dns/pull/251.patch"},"body":"### Use Case\r\nAs a deployment operator, I want to be able to chain DNS together with hostnames (not just IPs).\r\n\r\nNote: masters can already be specified by host or domain name.\r\n\r\n### Example Usage\r\n\r\nBecause deployments may contain more than just Mesos (e.g. Marathon), another DNS may be required that can resolve non-Mesos machines. In order to resolve Mesos, non-Mesos cluster machines, and internet domains, three DNS must be chained together. \r\n\r\nExample chain: `mesosdns` > `dnsdock` > `8.8.8.8`. \r\n\r\nBecause Mesos-DNS depends on both zookeeper and mesos-master, it may not be ready as soon as the DNS it delegates to. So all three DNS need to be configured for each machine in the above chain, as well as for the DNS themselves.\r\n\r\n#### Example docker-compose fragment\r\n\r\n```\r\ndnsdock:\r\n  hostname: dnsdock\r\n  image: tonistiigi/dnsdock\r\n  command: [ \"-nameserver=8.8.8.8\" ]\r\n  environment:\r\n  - DNSDOCK_NAME=dnsdock\r\n  - DNSDOCK_IMAGE=mesos\r\n  volumes:\r\n  - /var/run/docker.sock:/run/docker.sock\r\n  dns:\r\n  - 127.0.0.1\r\n  - 8.8.8.8\r\nmesosmaster1:\r\n  hostname: master1.mesos.docker\r\n  image: mesosphere/mesos:0.23.0-1.0.ubuntu1404\r\n  entrypoint: [ \"mesos-master\" ]\r\n  environment:\r\n  - DNSDOCK_NAME=master1\r\n  - DNSDOCK_IMAGE=mesos\r\n  dns:\r\n  - mesosdns.mesos.docker\r\n  - dnsdock\r\n  - 8.8.8.8\r\nmesosdns:\r\n  hostname: mesosdns.mesos.docker\r\n  image: mesosphere/mesos-dns\r\n  command: [ \"/usr/bin/mesos-dns\", \"-v=2\", \"-config=/config.json\" ]\r\n  environment:\r\n  - DNSDOCK_NAME=mesosdns\r\n  - DNSDOCK_IMAGE=mesos\r\n  volumes:\r\n  - /var/tmp/config.json:/config.json\r\n  links:\r\n  - dnsdock\r\n  - mesosmaster1\r\n  dns:\r\n  - localhost\r\n  - dnsdock\r\n  - 8.8.8.8\r\n```\r\n\r\n#### Example Mesos-DNS fragment\r\n\r\n```\r\n{\r\n  \"zk\": \"zk://zookeeper:2181/mesos\",\r\n  \"masters\": [\"mesosmaster1:5050\"],\r\n  \"domain\": \"mesos\",\r\n  \"resolvers\": [\"dnsdock\"],\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/comments/138722012","html_url":"https://github.com/mesosphere/mesos-dns/pull/251#issuecomment-138722012","issue_url":"https://api.github.com/repos/mesosphere/mesos-dns/issues/251","id":138722012,"user":{"login":"jdef","id":2348332,"avatar_url":"https://avatars.githubusercontent.com/u/2348332?v=3","gravatar_id":"","url":"https://api.github.com/users/jdef","html_url":"https://github.com/jdef","followers_url":"https://api.github.com/users/jdef/followers","following_url":"https://api.github.com/users/jdef/following{/other_user}","gists_url":"https://api.github.com/users/jdef/gists{/gist_id}","starred_url":"https://api.github.com/users/jdef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdef/subscriptions","organizations_url":"https://api.github.com/users/jdef/orgs","repos_url":"https://api.github.com/users/jdef/repos","events_url":"https://api.github.com/users/jdef/events{/privacy}","received_events_url":"https://api.github.com/users/jdef/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T22:29:44Z","updated_at":"2015-09-08T22:29:44Z","body":">  *However, a valid host name can never have the dotted-decimal form\n#.#.#.#, since at least the highest-level component label will be not\nall-numeric*\n\nOn Tue, Sep 8, 2015 at 6:26 PM, Karl Isenberg <notifications@github.com>\nwrote:\n\n> We don't need to introduce a lazy resolver. Lazy resolution already\n> functions with the current impl.\n>\n> To throw more fire on the validation:\n>\n> a host domain name is now allowed to begin with a digit and could legally\n> be entirely numeric\n>\n>\n> http://serverfault.com/questions/638260/is-it-valid-for-a-hostname-to-start-with-a-digit/638270#638270\n>\n> That said, I'm close to a validator that handles all the cases I've\n> documented.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/mesosphere/mesos-dns/pull/251#issuecomment-138721528>.\n>\n"}}