This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Mesos-DNS should not try and guess it's IP #379
Comments
@sargun are we still using milestones for mesos-dns? If so should this be added to 1.0? |
Just curious - which IP is given for ip_detect? If the system has multiple IPs? |
Entirely up to the sysadmin, whatever they think is most appropriate for Mesos internal communication. |
Do we recommend that people supply an IP that's routable? |
The answer is it's the right IP to use for their datacenter. We build out a preflight check harness to ensure that it's a IP that works correctly. |
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running / deploying DCOS we've found that software does not have a simple / reliable way to get the "correct" IP address for the host. Trying to do a reverse lookup on the hostname doesn't work (hostnames aren't set right or there isn't a global set of reverse-DNS entries). Looking up the default network route doesn't work (the network applications on top of DCOS should talk on is set to the default network, Mesos is expected to talk on a different network), as well as a number of other scenarios.
We ship every host in DCOS with exactly the same static configuration. This makes some problems (such as upgrading), a lot easier since every host doesn't have "magic" per-host extra state, as well as making our installs a lot more reliable (All that happens on host is the extraction of a big tarball then running tested code).
It is also important to note we run all the software through
systemd
, andsystemd
does not itself interpret bash statements in Exec lines (it will do environment variable substitution, but no subcommand execution).To allow sysadmins to configure "what IP should DCOS system software on a given host run with" we have them right an ip-detect script which when run will output the IP address the software should listen on. In AWS for instance, this will do something like ask the AWS metadata service what the local IPv4 Address is (
curl -fsSL http://169.254.169.254/latest/meta-data/local-ipv4
). The script always takes no arguments, and outputs one (and only one) IPv4 address to stdout. If the address is not a valid IPv4 address or more than just the IPv4 address and whitespace is output, the software calling the ip-detect script should error and exit.Mesos-DNS needs to gain the ability to run this ip-detect script to figure out its ip. This can be through some generic mechanism (ex: If an argument begins with
@exec:
the given script will be executed) or only for this one particular case (Gain aip_detect_filename
argument). I generally don't like having the ability to do arbitrary code injection, but in this case it is the best option at present, so prefer something towards the latter, but am fine with either.The text was updated successfully, but these errors were encountered: