Commit 9294514d authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Change bootstrap.SetupDaemonNode to use scp as we can assume SSH is setup

Signed-off-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarManuel Franceschini <>
Reviewed-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent c30421e0
......@@ -512,26 +512,15 @@ def SetupNodeDaemon(cluster_name, node, ssh_key_check):
# and then connect with ssh to set password and start ganeti-noded
# note that all the below variables are sanitized at this point,
# either by being constants or by the checks above
# TODO: Could this command exceed a shell's maximum command length?
mycommand = ("umask 077 && "
"cat > '%s' << '!EOF.' && \n"
"cat > '%s' << '!EOF.' && \n"
"cat > '%s' << '!EOF.' && \n"
"chmod 0400 %s %s %s && "
"%s start %s -b '%s'" %
(constants.NODED_CERT_FILE, noded_cert,
constants.RAPI_CERT_FILE, rapi_cert,
constants.CONFD_HMAC_KEY, confd_hmac_key,
constants.NODED_CERT_FILE, constants.RAPI_CERT_FILE,
constants.DAEMON_UTIL, constants.NODED, bind_address))
sshrunner.CopyFileToNode(node, constants.NODED_CERT_FILE)
sshrunner.CopyFileToNode(node, constants.RAPI_CERT_FILE)
sshrunner.CopyFileToNode(node, constants.CONFD_HMAC_KEY)
mycommand = ("%s start %s -b '%s'" % (constants.DAEMON_UTIL, constants.NODED,
result = sshrunner.Run(node, 'root', mycommand, batch=False,
if result.failed:
raise errors.OpExecError("Remote command on node %s, error: %s,"
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