moby--moby/daemon/cluster
Yong Tang 59db01049a Better error messages when IP address autodetection fails
This fix tries to improve error messages when IP address
autodetection fails, as is specified in 25141.

Previously, error messages only indicate that multiple IPs
exist when autodetection fails. In this fix, if one
interface consists of multiple addresses or multiple
interfaces consist of addresses, the error messages output
the address names and interface names so that end user could
take notice.

This fix is verified manually.
When multiple addresses exist on multiple interfaces:
```
$ sudo docker swarm init
Error response from daemon: could not choose an IP address
to advertise since this system has multiple addresses on different
interfaces (192.168.186.128 on ens33 and 192.168.100.199 on eth10)
 - specify one with --advertise-addr
```
When multiple addresses exist on single interface:
```
$ sudo docker swarm init
Error response from daemon: could not choose an IP address
to advertise since this system has multiple addresses
on interface ens33 (192.168.186.128 and 192.168.55.199)
- specify one with --advertise-addr
```

This fix fixes 25141.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-31 20:03:30 -07:00
..
convert Remove join-tokens from the /info API 2016-07-27 18:11:51 -07:00
executor Merge pull request #25043 from stevvooe/forked-pull-context 2016-07-26 01:01:09 -07:00
provider fix some typos 2016-06-21 15:29:25 +08:00
cluster.go Merge pull request #25034 from thaJeztah/update-swarm-usage 2016-07-29 01:01:00 +01:00
filters.go Allow partial name match for `node ls`, and `node tasks` 2016-07-20 08:16:10 -07:00
helpers.go Fix spelling in comments, strings and documentation 2016-07-03 20:58:11 +03:00
listen_addr.go Better error messages when IP address autodetection fails 2016-07-31 20:03:30 -07:00