Procházet zdrojové kódy

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

Make Docker automatically update hostname for Swarm node
Justin Cormack před 8 roky
rodič
revize
5c80826880
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      daemon/cluster/noderunner.go

+ 2 - 1
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,