Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Returns docker container IP instead of mesos host one #477

Open
eLvErDe opened this issue Oct 5, 2016 · 3 comments
Open

Returns docker container IP instead of mesos host one #477

eLvErDe opened this issue Oct 5, 2016 · 3 comments

Comments

@eLvErDe
Copy link

eLvErDe commented Oct 5, 2016

Hello,

I have a docker container running RMQ, in Marathon. One port is tagged as amqp (data protocol), the other one as mgmt (management interface)

Where doing:

dig -t SRV _amqp._rabbitmq-sentinelpoller-geojson.sentinel.data-pollers._tcp.marathon.mesos

I received the following answer:

;; ANSWER SECTION:
_amqp._rabbitmq-sentinelpoller-geojson.sentinel.data-pollers._tcp.marathon.mesos. 30 IN SRV 0 0 31673 rabbitmq-sentinelpoller-geojson.sentinel.data-pollers-ywmud-s8.marathon.mesos.

;; ADDITIONAL SECTION:
rabbitmq-sentinelpoller-geojson.sentinel.data-pollers-ywmud-s8.marathon.mesos. 30 IN A 172.17.0.2

I do not expect to receive 172.17.0.2 as address which is the internal NON-ROUTED docker address. Actually marathon also display a link to both data and mgmt port and use the right mesos host address.

Did I do something wrong ?

Best regards, Adam.

@eLvErDe
Copy link
Author

eLvErDe commented Oct 5, 2016

Hello,

Okay, it seems to be related to IPSources setting:

https://mesosphere.github.io/mesos-dns/docs/configuration-parameters.html

IPSources defines a fallback list of IP sources for task records, sorted by
priority. If you use Docker, and enable the netinfo IPSource, it may cause
tasks to become unreachable, because after Mesos 0.25, the Docker executor
publishes the container's internal IP in NetworkInfo.

The default value is: ["netinfo", "mesos", "host"]

Switching to host first fix it. Would you consider changing the default setting ? I don't really see the point returning the docker private address, it's completly pointless as mesos uses docker-proxy to bind the port on the host itself.

@jdef
Copy link
Contributor

jdef commented Jul 12, 2017

We've considered changing the default setting but have avoided doing so because (a) it breaks behavior that long-time users expect (and have scripted for in production); (b) it's easy enough to configure what you really want, and; (c) it's extremely difficult to arrive at a default that satisfies nearly everyone OOTB because clusters come in many flavors.

We've tried to do a good job documenting this behavior. It's arguable that we could do better. What would have helped you troubleshoot this more quickly?

@xkrt
Copy link

xkrt commented Mar 6, 2018

@jdef looks like official documentation are outdated http://mesosphere.github.io/mesos-dns/docs/configuration-parameters.html, it doesn't contain IPSources field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants