[
https://issues.apache.org/jira/browse/MESOS-2902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14621126#comment-14621126
]
David Robinson commented on MESOS-2902:
---------------------------------------
{quote}
I can't drop it in a systemd unit file which runs a command before mesos and
pass the data without making a temp file which is an odd way to do the config
generation.
{quote}
[~cmaloney], couldn't you use something like cloud-init to create the file for
EnvironmentFile=... ? eg:
{code}
EnvironmentFile=/etc/mesos/config.env
ExecStart=/usr/bin/mesos-slave... ${some_env_var_from_EnvironmentFile}...
{code}
If not cloud-init then perhaps a service that runs before mesos and populates
EnvironmentFile?
{quote}
The host-specific files break / fall apart if machines change IP / hostname
without being reinstalled.
{quote}
{quote}
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).
{quote}
Can you hook into whatever mechanism changes the IP/hostname and have it also
update EnvironmentFile? I'm fairly certain that dhclient and NetworkManager
could be hooked into to solve this, they both provide the ability to run a
script when an IP changes.
TBH I'm not convinced an --ip-detection flag is needed in mesos. Configuration
management shouldn't be Mesos's concern.
> 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)