Merge pull request #30259 from nishanttotla/dynamically-update-hostname

Make Docker automatically update hostname for Swarm node
Upstream-commit: 5c808268801e90f95f1dd8bc4f70c3f0434d6cb4
Component: engine
This commit is contained in:
Justin Cormack
2017-01-19 10:35:50 +00:00
committed by GitHub

View File

@ -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,