Commit 3753b2cb authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

ganeti-watcher: Don't run if paused

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 95b2e626
......@@ -31,6 +31,7 @@ import os
import sys
import time
import logging
import errno
from optparse import OptionParser
from ganeti import utils
......@@ -70,6 +71,13 @@ def Indent(s, prefix='| '):
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.
......@@ -476,6 +484,10 @@ def main():
utils.SetupLogging(constants.LOG_WATCHER, debug=options.debug,
if ShouldPause():
logging.debug("Pause has been set, exiting")
update_file = False
# on master or not, try to start the node dameon
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment