Browse code

Make Docker automatically update hostname for Swarm node

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>

Nishant Totla authored on 2017/01/19 06:37:43
Showing 1 changed files
... ...
@@ -94,8 +94,9 @@ func (n *nodeRunner) start(conf nodeStartConfig) error {
94 94
 		control = filepath.Join(n.cluster.runtimeRoot, controlSocket)
95 95
 	}
96 96
 
97
+	// Hostname is not set here. Instead, it is obtained from
98
+	// the node description that is reported periodically
97 99
 	swarmnodeConfig := swarmnode.Config{
98
-		Hostname:           n.cluster.config.Name,
99 100
 		ForceNewCluster:    conf.forceNewCluster,
100 101
 		ListenControlAPI:   control,
101 102
 		ListenRemoteAPI:    conf.ListenAddr,