I'd like to be able to use a local consul agent on the machine to resolve `.consul` domain names for services discovered outside the mesos cluster. The way I'm attempting to do this is by configuring dnsmasq to listen on 127.0.0.1:53 and direct all lookups for .consul domains to the local consul agent on port 8600.
Unfortunately a couple of things about the way DC/OS works conspire to make this impossible:
1. Resolvers cannot contain a port, only an IP address
2. Preflight Checks prevent anything from listening on port 53 (workaround: disable preflight checks)
3. Choosing 127.0.0.1, 188.8.131.52, 184.108.40.206 - causes DNS lookups to fail intermittently depending on which resolver responds first, since google can't resolve `.consul`. (Same problem for any non-local DNS server)
4. Resolvers are the same for both masters and slaves - so I can't choose 127.0.0.1 as my only resolver and have dnsmasq do the actual internet forwarding. Doing so would prevent masters from resolving any internet address because dnsmasq can't run on masters due to spartan requiring port 53 on the masters.
This whole chain of events can be solved by allowing resolvers to optionally specify a port number. so my resolvers would be:
which would allow dnsmasq to run on all servers, on a non-conflicting port, and not get caught by preflight checks or otherwise be prevented from working on all servers.