Revision 72737a7f lib/bootstrap.py
b/lib/bootstrap.py | ||
---|---|---|
38 | 38 |
from ganeti import objects |
39 | 39 |
from ganeti import ssconf |
40 | 40 |
|
41 |
from ganeti.rpc import RpcRunner |
|
41 | 42 |
|
42 | 43 |
def _InitSSHSetup(node): |
43 | 44 |
"""Setup the SSH configuration for the cluster. |
... | ... | |
236 | 237 |
|
237 | 238 |
# start the master ip |
238 | 239 |
# TODO: Review rpc call from bootstrap |
239 |
rpc.call_node_start_master(hostname.name, True)
|
|
240 |
RpcRunner.call_node_start_master(hostname.name, True)
|
|
240 | 241 |
|
241 | 242 |
|
242 | 243 |
def InitConfig(version, cluster_config, master_node_config, |
... | ... | |
281 | 282 |
begun in cmdlib.LUDestroyOpcode. |
282 | 283 |
|
283 | 284 |
""" |
284 |
if not rpc.call_node_stop_master(master, True):
|
|
285 |
if not RpcRunner.call_node_stop_master(master, True):
|
|
285 | 286 |
logging.warning("Could not disable the master role") |
286 |
if not rpc.call_node_leave_cluster(master):
|
|
287 |
if not RpcRunner.call_node_leave_cluster(master):
|
|
287 | 288 |
logging.warning("Could not shutdown the node daemon and cleanup the node") |
288 | 289 |
|
289 | 290 |
|
... | ... | |
365 | 366 |
|
366 | 367 |
logging.info("setting master to %s, old master: %s", new_master, old_master) |
367 | 368 |
|
368 |
if not rpc.call_node_stop_master(old_master, True):
|
|
369 |
if not RpcRunner.call_node_stop_master(old_master, True):
|
|
369 | 370 |
logging.error("could disable the master role on the old master" |
370 | 371 |
" %s, please disable manually", old_master) |
371 | 372 |
|
... | ... | |
374 | 375 |
|
375 | 376 |
# Here we have a phase where no master should be running |
376 | 377 |
|
377 |
if not rpc.call_upload_file(cfg.GetNodeList(),
|
|
378 |
constants.CLUSTER_CONF_FILE): |
|
378 |
if not RpcRunner.call_upload_file(cfg.GetNodeList(),
|
|
379 |
constants.CLUSTER_CONF_FILE):
|
|
379 | 380 |
logging.error("could not distribute the new simple store master file" |
380 | 381 |
" to the other nodes, please check.") |
381 | 382 |
|
382 |
if not rpc.call_node_start_master(new_master, True):
|
|
383 |
if not RpcRunner.call_node_start_master(new_master, True):
|
|
383 | 384 |
logging.error("could not start the master role on the new master" |
384 | 385 |
" %s, please check", new_master) |
385 | 386 |
rcode = 1 |
Also available in: Unified diff