mesos-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/MESOS-2902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619857#comment-14619857
] 

Cody Maloney commented on MESOS-2902:
-------------------------------------

In DCOS we do all Mesos config via environment variables (Allows better mixing and matching
in various environemnts). We ship the same mesos-master systemd unit to every cluster, and
then we change the configuration by swapping out environment variable files (See Systemd's
{{EnvironmentFile}} directive). Inside an {{EnvironmentFile}} we can't run arbitrary scripts.
It is structurally in-feasible to change the mesos-master systemd unit per cluster to include
the 'Set the IP by running this script' only in cases where we want to do that. There may
also cases where Mesos exits and we restart it, and it would refuse to start because it has
a different IP (mesos slave might checkpoint it, although I'd have to double check).

The IP to use is a per-host thing, so I can't ship a generic config file to every host in
the cluster which just sets {{LIBPROCESS_IP}} in an {{EnvironmentFile}}.

Writing a wrapper script which sets {{LIBPROCESS_IP}} and then does an {{exec mesos-master}}
is feasible, although it obfuscates what is happening, and if someone we ship DCOS to has
been hand-editing the script for their environment and gets the environment variable a little
bit wrong, things will error really badly (We've had a number of customers with mesos figuring
out that the host's IP is 127.0.0.1).

As far as the hostname stuff: In general we need Mesos not to do anything with hostnames in
a number of our environments because they are unreliable, esp. as a means for figuring out
"what address should I talk on".

> Enable Mesos to use arbitrary script / module to figure out IP, HOSTNAME
> ------------------------------------------------------------------------
>
>                 Key: MESOS-2902
>                 URL: https://issues.apache.org/jira/browse/MESOS-2902
>             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
endpoint.
> 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
reinstalled.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message