Commit 9e1333b9 authored by Guido Trotter's avatar Guido Trotter
Browse files

InitCluster, don't use SimpleConfigWriter

InitConfig returns a SimpleConfigWriter to InitCluster, which then
passes it on to ssh.WriteKnownHostsFile, which extracts a couple of
values from it. One line later the full ConfigWriter is initialized.

By initializing it one line before we can pass the full writer to
ssh.WriteKnownHostsFile, and thus we don't need to care anymore for the
InitConfig returned SimpleConfigWriter
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent 541822e0
......@@ -265,11 +265,9 @@ def InitCluster(cluster_name, mac_prefix,
offline=False, drained=False,
sscfg = InitConfig(constants.CONFIG_VERSION,
cluster_config, master_node_config)
ssh.WriteKnownHostsFile(sscfg, constants.SSH_KNOWN_HOSTS_FILE)
InitConfig(constants.CONFIG_VERSION, cluster_config, master_node_config)
cfg = config.ConfigWriter()
ssh.WriteKnownHostsFile(cfg, constants.SSH_KNOWN_HOSTS_FILE)
# start the master ip
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment