Revision 93b19295 lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
656 | 656 |
@param ssh_key_check: whether to do a strict key check |
657 | 657 |
|
658 | 658 |
""" |
659 |
family = ssconf.SimpleStore().GetPrimaryIPFamily() |
|
659 |
sstore = ssconf.SimpleStore() |
|
660 |
family = sstore.GetPrimaryIPFamily() |
|
660 | 661 |
sshrunner = ssh.SshRunner(cluster_name, |
661 | 662 |
ipv6=(family == netutils.IP6Address.family)) |
662 | 663 |
|
663 |
bind_address = constants.IP4_ADDRESS_ANY |
|
664 |
if family == netutils.IP6Address.family: |
|
665 |
bind_address = constants.IP6_ADDRESS_ANY |
|
666 |
|
|
667 | 664 |
# set up inter-node password and certificate and restarts the node daemon |
668 | 665 |
# and then connect with ssh to set password and start ganeti-noded |
669 | 666 |
# note that all the below variables are sanitized at this point, |
... | ... | |
673 | 670 |
sshrunner.CopyFileToNode(node, pathutils.SPICE_CERT_FILE) |
674 | 671 |
sshrunner.CopyFileToNode(node, pathutils.SPICE_CACERT_FILE) |
675 | 672 |
sshrunner.CopyFileToNode(node, pathutils.CONFD_HMAC_KEY) |
676 |
mycommand = ("%s stop-all; %s start %s -b %s" % |
|
677 |
(pathutils.DAEMON_UTIL, pathutils.DAEMON_UTIL, constants.NODED, |
|
678 |
utils.ShellQuote(bind_address))) |
|
673 |
for filename in sstore.GetFileList(): |
|
674 |
sshrunner.CopyFileToNode(node, filename) |
|
675 |
mycommand = ("%s stop-all; %s start %s" % |
|
676 |
(pathutils.DAEMON_UTIL, pathutils.DAEMON_UTIL, constants.NODED)) |
|
679 | 677 |
|
680 | 678 |
result = sshrunner.Run(node, "root", mycommand, batch=False, |
681 | 679 |
ask_key=ssh_key_check, |
Also available in: Unified diff