X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/f8ad55919c50dc2a8f02661ecb048595d2fe4bbe..6b93ec9d798ed53089a06bc0ced58ef1d8a9e4b0:/daemons/ganeti-masterd diff --git a/daemons/ganeti-masterd b/daemons/ganeti-masterd index 5e524d9..ac0af6d 100755 --- a/daemons/ganeti-masterd +++ b/daemons/ganeti-masterd @@ -402,9 +402,9 @@ def CheckAgreement(): continue break if retries == 0: - logging.critical("Cluster inconsistent, most of the nodes didn't answer" - " after multiple retries. Aborting startup") - return False + logging.critical("Cluster inconsistent, most of the nodes didn't answer" + " after multiple retries. Aborting startup") + return False # here a real node is at the top of the list all_votes = sum(item[1] for item in votes) top_node, top_votes = votes[0] @@ -429,6 +429,9 @@ def main(): utils.debug = options.debug utils.no_fork = True + if options.fork: + utils.CloseFDs() + rpc.Init() try: ssconf.CheckMaster(options.debug) @@ -460,8 +463,7 @@ def main(): # become a daemon if options.fork: - utils.Daemonize(logfile=constants.LOG_MASTERDAEMON, - noclose_fds=[master.fileno()]) + utils.Daemonize(logfile=constants.LOG_MASTERDAEMON) utils.WritePidFile(constants.MASTERD_PID) try: