Revision bbe19c17
b/daemons/ganeti-masterd | ||
---|---|---|
413 | 413 |
result = False |
414 | 414 |
if top_node != myself: |
415 | 415 |
logging.critical("It seems we are not the master (top-voted node" |
416 |
" is %s)", top_node) |
|
416 |
" is %s with %d out of %d votes)", top_node, top_votes, |
|
417 |
all_votes) |
|
417 | 418 |
elif top_votes < all_votes - top_votes: |
418 | 419 |
logging.critical("It seems we are not the master (%d votes for," |
419 | 420 |
" %d votes against)", top_votes, all_votes - top_votes) |
b/lib/bootstrap.py | ||
---|---|---|
357 | 357 |
" this node." % (old_master, voted_master)) |
358 | 358 |
# end checks |
359 | 359 |
|
360 |
# instantiate a real config writer, as we now know we have the |
|
361 |
# configuration data |
|
362 |
cfg = ssconf.SimpleConfigWriter() |
|
363 |
|
|
364 | 360 |
rcode = 0 |
365 | 361 |
|
366 | 362 |
logging.info("Setting master to %s, old master: %s", new_master, old_master) |
... | ... | |
369 | 365 |
logging.error("Could not disable the master role on the old master" |
370 | 366 |
" %s, please disable manually", old_master) |
371 | 367 |
|
372 |
cfg.SetMasterNode(new_master) |
|
373 |
cfg.Save() |
|
374 |
|
|
375 | 368 |
# Here we have a phase where no master should be running |
376 | 369 |
|
377 |
if not rpc.RpcRunner.call_upload_file(cfg.GetNodeList(), |
|
378 |
constants.CLUSTER_CONF_FILE): |
|
379 |
logging.error("Could not distribute the new configuration" |
|
380 |
" to the other nodes, please check.") |
|
370 |
# instantiate a real config writer, as we now know we have the |
|
371 |
# configuration data |
|
372 |
cfg = config.ConfigWriter() |
|
381 | 373 |
|
374 |
cluster_info = cfg.GetClusterInfo() |
|
375 |
cluster_info.master_node = new_master |
|
376 |
# this will also regenerate the ssconf files, since we updated the |
|
377 |
# cluster info |
|
378 |
cfg.Update(cluster_info) |
|
382 | 379 |
|
383 | 380 |
if not rpc.RpcRunner.call_node_start_master(new_master, True): |
384 | 381 |
logging.error("Could not start the master role on the new master" |
Also available in: Unified diff