mantl / mesos-consul

Mesos to Consul bridge for service discovery
Apache License 2.0
338 stars 95 forks source link

dns failing inside the container #10

Closed rncry closed 8 years ago

rncry commented 9 years ago

We're using local consul agents to provide dns for all our nodes in the cluster. This is setup via resolv.conf and works without any problems both on the host and inside all other running containers.

mesos-consul however cannot seem to resolve hosts (namely zookeeper). I can ping zookeeper on the host and it resolves, I can start an ubuntu container and ping zookeeper from inside it. I've tried changing the entrypoint of mesos-consul to /bin/sh and pinging our zookeeper hosts fail inside the container. Any ideas?

rncry commented 9 years ago

It seems that search domains are not respected within the container. If I give the FQDN for zookeeper it works.

rncry commented 9 years ago

/ # ping zookeeper ping: bad address 'zookeeper' / # ping zookeeper.service.test PING zookeeper.service.test (172.20.121.251): 56 data bytes 64 bytes from 172.20.121.251: seq=0 ttl=63 time=0.535 ms ^C --- zookeeper.service.test ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 0.535/0.535/0.535 ms / # cat /etc/resolv.conf nameserver 172.17.42.1 search service.test node.test test

rncry commented 9 years ago

Apparently this is not supported in alpine linux's resolver: https://bugs.alpinelinux.org/issues/469

flyinprogrammer commented 8 years ago

call me crazy but it would seem the space savings of alpine is > than the pain of supplying a FQDN ?

rncry commented 8 years ago

In some of the environments we're building we can't provide a FQDN programatically so it's essential for us.

On Fri, Oct 30, 2015 at 1:22 AM, Alan notifications@github.com wrote:

call me crazy but it would seem the space savings of alpine is > than the pain of supplying a FQDN ?

— Reply to this email directly or view it on GitHub https://github.com/CiscoCloud/mesos-consul/issues/10#issuecomment-152373763 .

flyinprogrammer commented 8 years ago

fair enough!

rncry commented 8 years ago

Closing as there is now an ubuntu image provided :) thanks!

erSitzt commented 6 years ago

Switching the Dockerfile to Alpine 3.6 helps too

FROM golang:1.8-alpine3.6