Revision b43dcc5a lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
348 | 348 |
sshkey = sshline.split(" ")[1] |
349 | 349 |
|
350 | 350 |
if modify_etc_hosts: |
351 |
utils.AddHostToEtcHosts(hostname.name)
|
|
351 |
utils.AddHostToEtcHosts(hostname) |
|
352 | 352 |
|
353 | 353 |
if modify_ssh_setup: |
354 | 354 |
_InitSSHSetup() |
... | ... | |
480 | 480 |
@param ssh_key_check: whether to do a strict key check |
481 | 481 |
|
482 | 482 |
""" |
483 |
sshrunner = ssh.SshRunner(cluster_name) |
|
483 |
family = ssconf.SimpleStore().GetPrimaryIPFamily() |
|
484 |
sshrunner = ssh.SshRunner(cluster_name, |
|
485 |
ipv6=family==netutils.IP6Address.family) |
|
484 | 486 |
|
485 | 487 |
noded_cert = utils.ReadFile(constants.NODED_CERT_FILE) |
486 | 488 |
rapi_cert = utils.ReadFile(constants.RAPI_CERT_FILE) |
... | ... | |
502 | 504 |
if not confd_hmac_key.endswith("\n"): |
503 | 505 |
confd_hmac_key += "\n" |
504 | 506 |
|
507 |
bind_address = constants.IP4_ADDRESS_ANY |
|
508 |
if family == netutils.IP6Address.family: |
|
509 |
bind_address = constants.IP6_ADDRESS_ANY |
|
510 |
|
|
505 | 511 |
# set up inter-node password and certificate and restarts the node daemon |
506 | 512 |
# and then connect with ssh to set password and start ganeti-noded |
507 | 513 |
# note that all the below variables are sanitized at this point, |
... | ... | |
515 | 521 |
"cat > '%s' << '!EOF.' && \n" |
516 | 522 |
"%s!EOF.\n" |
517 | 523 |
"chmod 0400 %s %s %s && " |
518 |
"%s start %s" % |
|
524 |
"%s start %s -b '%s'" %
|
|
519 | 525 |
(constants.NODED_CERT_FILE, noded_cert, |
520 | 526 |
constants.RAPI_CERT_FILE, rapi_cert, |
521 | 527 |
constants.CONFD_HMAC_KEY, confd_hmac_key, |
522 | 528 |
constants.NODED_CERT_FILE, constants.RAPI_CERT_FILE, |
523 | 529 |
constants.CONFD_HMAC_KEY, |
524 |
constants.DAEMON_UTIL, constants.NODED)) |
|
530 |
constants.DAEMON_UTIL, constants.NODED, bind_address))
|
|
525 | 531 |
|
526 | 532 |
result = sshrunner.Run(node, 'root', mycommand, batch=False, |
527 | 533 |
ask_key=ssh_key_check, |
Also available in: Unified diff