Search code examples
dnsmesosmesosphere

How does Mesos-DNS name tasks with slash ("nested")?


For example:

If Marathon is running a task named /cassandra, Mesos-DNS assigns it a DNS name - cassandra.marathon.mesos.

Now I have a task named /monit/promdash. How can I find its DNS name?

Already tried:

  • monit_promdash.marathon.mesos, promdash_monit.marathon.mesos (and with - instead of _), monit.marathon.mesos, promdash.marathon.mesos, ...)

  • There's a HTTP interface. Couldn't find how to list all DNS names either...

Thanks,


Solution

  • Marathon reverses the hierarchical names, concatenates them with - and this is the app name then, so in your case it would be promdash-monit.marathon.mesos. Try it out.

    At the bottom of the Mesos-DNS naming documentation we provide some more details about how these FQHN are constructed and you can also check out a complete end-to-end example I've put together, using two levels of hierarchies.