From ce34ab60cd6c79b2c70a2b83d86eab42c5accbc6 Mon Sep 17 00:00:00 2001 From: Nishant Totla Date: Wed, 18 Jan 2017 13:37:43 -0800 Subject: [PATCH] Make Docker automatically update hostname for Swarm node Signed-off-by: Nishant Totla Upstream-commit: 8de8b1d520d4d60ccc813121f0c718b98efdc220 Component: engine --- components/engine/daemon/cluster/noderunner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/engine/daemon/cluster/noderunner.go b/components/engine/daemon/cluster/noderunner.go index dc24ff115c..b96e9aacd8 100644 --- a/components/engine/daemon/cluster/noderunner.go +++ b/components/engine/daemon/cluster/noderunner.go @@ -94,8 +94,9 @@ func (n *nodeRunner) start(conf nodeStartConfig) error { control = filepath.Join(n.cluster.runtimeRoot, controlSocket) } + // Hostname is not set here. Instead, it is obtained from + // the node description that is reported periodically swarmnodeConfig := swarmnode.Config{ - Hostname: n.cluster.config.Name, ForceNewCluster: conf.forceNewCluster, ListenControlAPI: control, ListenRemoteAPI: conf.ListenAddr,