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

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

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.

I could make a new mesos-init-fetch-ip script which I run instead of mesos, and 
that script then execs mesos. This confuses init system tracking of processes 
somewhat, and obfuscates what the underlying commands being run are.

It also adds a lot of error scenarios. For example, the wrapper script is 
updated and the change contains a typo, so it sets LIBPROCES_IP instead of 
LIBPROCESS_IP), Libprocess silently ignores the wrong environment variable. The 
environment I'm in Libprocess' internal logic guesses an IP that works. It gets 
engrained slightly incorrect as it rolls out across the cluster.

Currently one of the biggest pain points in initially setting up a Mesos 
cluster is getting the right IPs + Hostnames setup. If Mesos Master and Mesos 
Slave had a flag which was required, {{ \-\-ip\-detection=reverse_dns}} or 
{{--ip-detection=,/usr/bin/detect_mesos_ip} }}. It would make it so that users 
see what mesos is doing and make an informed decision, rather than running 
Mesos, having things break with really bad error messages (Wrong hostname/IP on 
your Scheduler? No logging of things breaking happens...).

As far as generalizing it further. Note I'm saying IP, HOSTNAME are 
host-specific, which is why this sort of capability makes sense. It is 
impossible for me to know when I'm installing static config files to a Host, 
VM, Docker what the IP and Hostname are going to be. That is not the case for 
{{\-\-resources}}, {{\-quiet}} and the like. They are able to be pre-determined 
for a host. IP and Hostname are Runtime parameters of a machine (When you 
attach your machine to a network, they are assigned dynamically).

> 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
>            Priority: Minor
>              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)

Reply via email to