moby--moby/api/client
Aaron Lehmann a0ccd0d42f Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-07-24 09:23:07 -07:00
..
bundlefile Add some tests for bundlefile and improve the error messages for LoadFile 2016-06-16 18:18:25 -04:00
container fix typo creats into creates in comments 2016-07-16 17:55:18 +08:00
formatter Do not show empty tags for digest references in output 2016-06-14 22:44:49 -07:00
idresolver Update to new swarmkit/engine-api 2016-06-30 17:22:47 -07:00
image Merge pull request #24389 from Microsoft/jjh/silentsecurity 2016-07-08 11:06:33 -07:00
inspect remove fallback for Go 1.4 2016-06-07 22:38:02 +02:00
network Don't automagically add "[OPTIONS]" to usage 2016-07-19 00:07:19 +02:00
node Replace secrets with join tokens 2016-07-21 15:23:03 -07:00
plugin Merge pull request #24722 from thaJeztah/update-usage-for-deprecated-flags 2016-07-19 11:01:33 -04:00
registry fix stdout and stderr in api client 2016-07-05 23:07:40 +08:00
service Merge pull request #24872 from stevvooe/mount-aliases 2016-07-23 14:02:31 +02:00
stack Append --registry-auth with with 2016-07-22 10:38:56 +02:00
swarm Split advertised address from listen address 2016-07-24 09:23:07 -07:00
system Split advertised address from listen address 2016-07-24 09:23:07 -07:00
task Improve timestamp formatting 2016-07-01 17:55:52 -07:00
volume Dont run man generation as part of test-unit. 2016-07-19 12:00:35 -04:00
cli.go Windows: Always enable VT emulation 2016-06-23 13:14:39 -07:00
client.go Make sure docker api client implements engine-api client. 2016-01-07 21:02:19 -05:00
commands.go Use spf13/cobra for docker update 2016-06-22 11:06:44 -07:00
credentials.go Migrate login & logout command to cobra 2016-06-10 12:04:29 +02:00
exec.go Don't automagically add "[OPTIONS]" to usage 2016-07-19 00:07:19 +02:00
exec_test.go Update client code with api changes 2016-04-15 12:48:01 +02:00
hijack.go Fix logrus formatting 2016-06-11 13:16:55 -07:00
inspect.go Don't automagically add "[OPTIONS]" to usage 2016-07-19 00:07:19 +02:00
registry.go Merge pull request #23584 from nishanttotla/private-images-swarm-services 2016-06-30 17:18:59 -07:00
trust.go api,daemon: cleanup some unused stuff 2016-06-21 14:15:19 -07:00
trust_test.go Modify import paths to point to the new engine-api package. 2016-01-06 19:48:59 -05:00
utils.go fix some typos 2016-06-21 15:29:25 +08:00