From 05cc153f9e710a437c716bbb42db67cd7e01e4a3 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Wed, 3 Dec 2008 11:12:55 +0000
Subject: [PATCH] InitCluster force a config file update

After the cluster is ready we'll load the ConfigWriter and force a
writeout of all config files.

Reviewed-by: imsnah
---
 lib/bootstrap.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index 768ef855b..e6c84d8f9 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -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
-- 
GitLab