Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information