Revision 9294514d

b/lib/bootstrap.py
512 512
  # and then connect with ssh to set password and start ganeti-noded
513 513
  # note that all the below variables are sanitized at this point,
514 514
  # either by being constants or by the checks above
515
  # TODO: Could this command exceed a shell's maximum command length?
516
  mycommand = ("umask 077 && "
517
               "cat > '%s' << '!EOF.' && \n"
518
               "%s!EOF.\n"
519
               "cat > '%s' << '!EOF.' && \n"
520
               "%s!EOF.\n"
521
               "cat > '%s' << '!EOF.' && \n"
522
               "%s!EOF.\n"
523
               "chmod 0400 %s %s %s && "
524
               "%s start %s -b '%s'" %
525
               (constants.NODED_CERT_FILE, noded_cert,
526
                constants.RAPI_CERT_FILE, rapi_cert,
527
                constants.CONFD_HMAC_KEY, confd_hmac_key,
528
                constants.NODED_CERT_FILE, constants.RAPI_CERT_FILE,
529
                constants.CONFD_HMAC_KEY,
530
                constants.DAEMON_UTIL, constants.NODED, bind_address))
515
  sshrunner.CopyFileToNode(node, constants.NODED_CERT_FILE)
516
  sshrunner.CopyFileToNode(node, constants.RAPI_CERT_FILE)
517
  sshrunner.CopyFileToNode(node, constants.CONFD_HMAC_KEY)
518
  mycommand = ("%s start %s -b '%s'" % (constants.DAEMON_UTIL, constants.NODED,
519
                                        bind_address))
531 520

  
532 521
  result = sshrunner.Run(node, 'root', mycommand, batch=False,
533 522
                         ask_key=ssh_key_check,
534
                         use_cluster_key=False,
523
                         use_cluster_key=True,
535 524
                         strict_host_check=ssh_key_check)
536 525
  if result.failed:
537 526
    raise errors.OpExecError("Remote command on node %s, error: %s,"

Also available in: Unified diff