Revision a4af651e daemons/ganeti-masterd

b/daemons/ganeti-masterd
342 342
    utils.Daemonize(logfile=constants.LOG_MASTERDAEMON,
343 343
                    noclose_fds=[master.fileno()])
344 344

  
345
  master.setup_processors()
346 345
  try:
347
    master.serve_forever()
348
  finally:
346
    utils.Lock('cmd', debug=options.debug)
347
  except errors.LockError, err:
348
    print >> sys.stderr, str(err)
349 349
    master.server_cleanup()
350
    return
351

  
352
  try:
353
    master.setup_processors()
354
    try:
355
      master.serve_forever()
356
    finally:
357
      master.server_cleanup()
358
  finally:
359
    utils.Unlock('cmd')
360
    utils.LockCleanup()
361

  
350 362

  
351 363
if __name__ == "__main__":
352 364
  main()

Also available in: Unified diff