Commit 5627f375 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

bootstrap: Wait for node daemon when adding new node

Until now this was only done for the master node, though
the problem originally fixed in 8f215968

 also occurs for
other node daemons.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 288d9e01
......@@ -132,17 +132,24 @@ def _InitGanetiServerSetup(master_name):
" had exitcode %s and error %s" %
(result.cmd, result.exit_code, result.output))
# Wait for node daemon to become responsive
def _WaitForNodeDaemon(node_name):
"""Wait for node daemon to become responsive.
def _CheckNodeDaemon():
result = rpc.RpcRunner.call_version([master_name])[master_name]
result = rpc.RpcRunner.call_version([node_name])[node_name]
if result.fail_msg:
raise utils.RetryAgain()
utils.Retry(_CheckNodeDaemon, 1.0, 10.0)
except utils.RetryTimeout:
raise errors.OpExecError("Node daemon didn't answer queries within"
" 10 seconds")
raise errors.OpExecError("Node daemon on %s didn't answer queries within"
" 10 seconds" % node_name)
def InitCluster(cluster_name, mac_prefix,
master_netdev, file_storage_dir, candidate_pool_size,
......@@ -426,6 +433,8 @@ def SetupNodeDaemon(cluster_name, node, ssh_key_check):
" output: %s" %
(node, result.fail_reason, result.output))
def MasterFailover(no_voting=False):
"""Failover the master node.
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