Revision 675e2bf5
b/lib/server/masterd.py | ||
---|---|---|
578 | 578 |
# If CheckMaster didn't fail we believe we are the master, but we have to |
579 | 579 |
# confirm with the other nodes. |
580 | 580 |
if options.no_voting: |
581 |
if options.yes_do_it: |
|
582 |
return |
|
581 |
if not options.yes_do_it: |
|
582 |
sys.stdout.write("The 'no voting' option has been selected.\n") |
|
583 |
sys.stdout.write("This is dangerous, please confirm by" |
|
584 |
" typing uppercase 'yes': ") |
|
585 |
sys.stdout.flush() |
|
583 | 586 |
|
584 |
sys.stdout.write("The 'no voting' option has been selected.\n")
|
|
585 |
sys.stdout.write("This is dangerous, please confirm by"
|
|
586 |
" typing uppercase 'yes': ")
|
|
587 |
sys.stdout.flush()
|
|
587 |
confirmation = sys.stdin.readline().strip()
|
|
588 |
if confirmation != "YES":
|
|
589 |
print >> sys.stderr, "Aborting."
|
|
590 |
sys.exit(constants.EXIT_FAILURE)
|
|
588 | 591 |
|
589 |
confirmation = sys.stdin.readline().strip() |
|
590 |
if confirmation != "YES": |
|
591 |
print >> sys.stderr, "Aborting." |
|
592 |
else: |
|
593 |
# CheckAgreement uses RPC and threads, hence it needs to be run in |
|
594 |
# a separate process before we call utils.Daemonize in the current |
|
595 |
# process. |
|
596 |
if not utils.RunInSeparateProcess(CheckAgreement): |
|
592 | 597 |
sys.exit(constants.EXIT_FAILURE) |
593 | 598 |
|
594 |
return |
|
595 |
|
|
596 |
# CheckAgreement uses RPC and threads, hence it needs to be run in a separate |
|
597 |
# process before we call utils.Daemonize in the current process. |
|
598 |
if not utils.RunInSeparateProcess(CheckAgreement): |
|
599 |
sys.exit(constants.EXIT_FAILURE) |
|
600 |
|
|
601 | 599 |
# ActivateMasterIP also uses RPC/threads, so we run it again via a |
602 | 600 |
# separate process. |
603 | 601 |
|
Also available in: Unified diff