Revision 3ee53f1f daemons/ganeti-masterd

b/daemons/ganeti-masterd
530 530
  utils.RunInSeparateProcess(ActivateMasterIP)
531 531

  
532 532

  
533
def ExecMasterd(options, args, _): # pylint: disable-msg=W0613
534
  """Main master daemon function, executed with the PID file held.
533
def PrepMasterd(options, _):
534
  """Prep master daemon function, executed with the PID file held.
535 535

  
536 536
  """
537 537
  # This is safe to do as the pid file guarantees against
......
541 541
  mainloop = daemon.Mainloop()
542 542
  master = MasterServer(mainloop, constants.MASTER_SOCKET,
543 543
                        options.uid, options.gid)
544
  return (mainloop, master)
545

  
546

  
547
def ExecMasterd(options, args, prep_data): # pylint: disable-msg=W0613
548
  """Main master daemon function, executed with the PID file held.
549

  
550
  """
551
  (mainloop, master) = prep_data
544 552
  try:
545 553
    rpc.Init()
546 554
    try:
......
568 576
  parser.add_option("--yes-do-it", dest="yes_do_it",
569 577
                    help="Override interactive check for --no-voting",
570 578
                    default=False, action="store_true")
571
  daemon.GenericMain(constants.MASTERD, parser, CheckMasterd, None,
579
  daemon.GenericMain(constants.MASTERD, parser, CheckMasterd, PrepMasterd,
572 580
                     ExecMasterd, multithreaded=True)
573 581

  
574 582

  

Also available in: Unified diff