Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #370 from mesosphere/fix-netinfo
Browse files Browse the repository at this point in the history
Add IPSources into config.json.sample, omitting NetInfo
  • Loading branch information
sargun committed Nov 24, 2015
2 parents 0debbcf + 416d0ca commit 81c176b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
"httpport": 8123,
"externalon": true,
"recurseon": true
"IPSources": ["mesos", "host"]
}
2 changes: 1 addition & 1 deletion docs/docs/configuration-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The configured name will always be converted to a FQDN by ensuring it ends with
`enforceRFC952` will enforce an older, more strict set of rules for DNS labels. For details, see the [RFC-952](https://tools.ietf.org/html/rfc952). The default value is `false`.

`IPSources` defines a fallback list of IP sources for task records,
sorted by priority. The default value is: `["netinfo", "mesos", "host"]`
sorted by priority. If you use **Docker**, and enable the `netinfo` IPSource, it may cause tasks to become unreachable, because after Mesos 0.25, the Docker executor publishes the container's internal IP in NetworkInfo. The default value is: `["netinfo", "mesos", "host"]`

- `host`: Host IP of the Mesos slave where a task is running.
- `mesos`: Mesos containerizer IP. **DEPRECATED**
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Note that the `hostname` field refers to the hostname used by the slave when it
curl http://master_hostname:5050/master/state.json | python -mjson.tool
```

### Mesos-DNS with Docker
If you choose to use Mesos-DNS with Docker, with a version of Mesos after 0.25, be aware that there are some caveats. By default the Docker executor publishes the IP of the Docker container into the NetworkInfo field. Unfortunately, unless you're running some kind of SDN solution, bridged, or host networking with Docker, this can prove to make the containers unreachable.

The default configuration that Mesos-DNS ships with in config.json.sample omits `netinfo` from the sources. The default options if you omit this field from the configuration includes `netinfo`. If you have trouble with Docker, ensure you check the IPSources field to omit netinfo.

### Slave Setup

To allow Mesos tasks to use Mesos-DNS as the primary DNS server, you must edit the file `/etc/resolv.conf` in every slave and add a new nameserver. For instance, if `mesos-dns` runs on the server with IP address `10.181.64.13`, you should add the line `nameserver 10.181.64.13` at the ***beginning*** of `/etc/resolv.conf` on every slave node. This can be achieve by running:
Expand Down

0 comments on commit 81c176b

Please sign in to comment.