mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Massenzio (JIRA)" <>
Subject [jira] [Commented] (MESOS-2902) Enable Mesos to use arbitrary script / module to figure out IP, HOSTNAME
Date Thu, 09 Jul 2015 04:33:04 GMT


Marco Massenzio commented on MESOS-2902:

Got it - seems to me that the real issue is that, if the {{--ip}} is not set and the {{LIBPROCESS_IP}}
is not set either (by design or accident) Mesos's default behavior of using {{}}
(or some other random IP/hostname) is really the sticky point.

I may be wrong here, but this is what happens in both Master/Slave - looking at both {{main.cpp}}
and the {{Master::initialize()}} and {{Slave::initialize()}} methods (are there other places?)
the behavior is as follows:

- if {{--ip}} is set, set {{LIBPROCESS_IP}} accordingly;
- then, if {{LIBPROCESS_IP}} is set, try and parse it into a valid IP;
- if it's not set, use {{Address::LOCALHOST_ANY();}} which is essentially {{}} and
will, ultimately, result in using {{}} (at least, this is what happens on OSX, I'm
guessing the behavior changes on other systems/configurations/whatever).

What if we add a {{--ip-explicit}} boolean flag that will result in Mesos exiting with an
error if steps 1. + 2. do not yield a valid IP?

BTW - maybe you don't really need a "wrapper" script; would just a script that runs at startup
(and/or other significant events) which exports LIBPROCESS_IP be feasible? (sorry, my knowledge
of systemd only extends to spelling it right).

> Enable Mesos to use arbitrary script / module to figure out IP, HOSTNAME
> ------------------------------------------------------------------------
>                 Key: MESOS-2902
>                 URL:
>             Project: Mesos
>          Issue Type: Improvement
>          Components: master, modules, slave
>            Reporter: Cody Maloney
>            Assignee: Marco Massenzio
>            Priority: Critical
>              Labels: mesosphere
> Currently Mesos tries to guess the IP, HOSTNAME by doing a reverse DNS lookup. This doesn't
work on a lot of clouds as we want things like public IPs (which aren't the default DNS),
there aren't FQDN names (Azure), or the correct way to figure it out is to call some cloud-specific
> If Mesos / Libprocess could load a mesos-module (Or run a script) which is provided per-cloud,
we can figure out perfectly the IP / Hostname for the given environment. It also means we
can ship one identical set of files to all hosts in a given provider which doesn't happen
to have the DNS scheme + hostnames that libprocess/Mesos expects. Currently we have to generate
host-specific config files which Mesos uses to guess.
> The host-specific files break / fall apart if machines change IP / hostname without being

This message was sent by Atlassian JIRA

View raw message