InitCluster force a config file update
authorGuido Trotter <ultrotter@google.com>
Wed, 3 Dec 2008 11:12:55 +0000 (11:12 +0000)
committerGuido Trotter <ultrotter@google.com>
Wed, 3 Dec 2008 11:12:55 +0000 (11:12 +0000)
After the cluster is ready we'll load the ConfigWriter and force a
writeout of all config files.

Reviewed-by: imsnah

lib/bootstrap.py

index 768ef85..e6c84d8 100644 (file)
@@ -223,9 +223,11 @@ def InitCluster(cluster_name, mac_prefix, def_bridge,
                                     master_candidate=True,
                                     )
 
-  cfg = InitConfig(constants.CONFIG_VERSION,
-                   cluster_config, master_node_config)
-  ssh.WriteKnownHostsFile(cfg, constants.SSH_KNOWN_HOSTS_FILE)
+  sscfg = InitConfig(constants.CONFIG_VERSION,
+                     cluster_config, master_node_config)
+  ssh.WriteKnownHostsFile(sscfg, constants.SSH_KNOWN_HOSTS_FILE)
+  cfg = config.ConfigWriter()
+  cfg.Update(cfg.GetClusterInfo())
 
   # start the master ip
   # TODO: Review rpc call from bootstrap