import sys
import time
import logging
+import errno
from optparse import OptionParser
from ganeti import utils
return "%s%s\n" % (prefix, ('\n' + prefix).join(s.splitlines()))
+def ShouldPause():
+ """Check whether we should pause.
+
+ """
+ return bool(utils.ReadWatcherPauseFile(constants.WATCHER_PAUSEFILE))
+
+
def StartMaster():
"""Try to start the master daemon.
utils.SetupLogging(constants.LOG_WATCHER, debug=options.debug,
stderr_logging=options.debug)
+ if ShouldPause():
+ logging.debug("Pause has been set, exiting")
+ sys.exit(constants.EXIT_SUCCESS)
+
update_file = False
try:
# on master or not, try to start the node dameon