Revision db04ce5d lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
222 | 222 |
|
223 | 223 |
""" |
224 | 224 |
def _CheckNodeDaemon(): |
225 |
result = rpc.RpcRunner.call_version([node_name])[node_name]
|
|
225 |
result = rpc.BootstrapRunner().call_version([node_name])[node_name]
|
|
226 | 226 |
if result.fail_msg: |
227 | 227 |
raise utils.RetryAgain() |
228 | 228 |
|
... | ... | |
565 | 565 |
""" |
566 | 566 |
cfg = config.ConfigWriter() |
567 | 567 |
modify_ssh_setup = cfg.GetClusterInfo().modify_ssh_setup |
568 |
result = rpc.RpcRunner.call_node_stop_master(master)
|
|
568 |
result = rpc.BootstrapRunner().call_node_stop_master(master)
|
|
569 | 569 |
msg = result.fail_msg |
570 | 570 |
if msg: |
571 | 571 |
logging.warning("Could not disable the master role: %s", msg) |
572 |
result = rpc.RpcRunner.call_node_leave_cluster(master, modify_ssh_setup) |
|
572 |
result = rpc.BootstrapRunner().call_node_leave_cluster(master, |
|
573 |
modify_ssh_setup) |
|
573 | 574 |
msg = result.fail_msg |
574 | 575 |
if msg: |
575 | 576 |
logging.warning("Could not shutdown the node daemon and cleanup" |
... | ... | |
697 | 698 |
|
698 | 699 |
logging.info("Stopping the master daemon on node %s", old_master) |
699 | 700 |
|
700 |
result = rpc.RpcRunner.call_node_stop_master(old_master)
|
|
701 |
result = rpc.BootstrapRunner().call_node_stop_master(old_master)
|
|
701 | 702 |
msg = result.fail_msg |
702 | 703 |
if msg: |
703 | 704 |
logging.error("Could not disable the master role on the old master" |
... | ... | |
726 | 727 |
|
727 | 728 |
logging.info("Starting the master daemons on the new master") |
728 | 729 |
|
729 |
result = rpc.RpcRunner.call_node_start_master_daemons(new_master, no_voting) |
|
730 |
result = rpc.BootstrapRunner().call_node_start_master_daemons(new_master, |
|
731 |
no_voting) |
|
730 | 732 |
msg = result.fail_msg |
731 | 733 |
if msg: |
732 | 734 |
logging.error("Could not start the master role on the new master" |
... | ... | |
782 | 784 |
if not node_list: |
783 | 785 |
# no nodes left (eventually after removing myself) |
784 | 786 |
return [] |
785 |
results = rpc.RpcRunner.call_master_info(node_list)
|
|
787 |
results = rpc.BootstrapRunner().call_master_info(node_list)
|
|
786 | 788 |
if not isinstance(results, dict): |
787 | 789 |
# this should not happen (unless internal error in rpc) |
788 | 790 |
logging.critical("Can't complete rpc call, aborting master startup") |
Also available in: Unified diff