diff --git a/daemons/ganeti-watcher b/daemons/ganeti-watcher index b2a995ba5e2ece3208ed5dceb52b6ffd61ece673..2b65dcdf2a4879fcbb41f231823ea7b6099efa96 100755 --- a/daemons/ganeti-watcher +++ b/daemons/ganeti-watcher @@ -671,6 +671,8 @@ def ParseOptions(): parser.add_option("-A", "--job-age", dest="job_age", help="Autoarchive jobs older than this age (default" " 6 hours)", default=6*3600) + parser.add_option("--ignore-pause", dest="ignore_pause", default=False, + action="store_true", help="Ignore cluster pause setting") options, args = parser.parse_args() options.job_age = cli.ParseTimespec(options.job_age) return options, args @@ -692,7 +694,7 @@ def main(): utils.SetupLogging(constants.LOG_WATCHER, debug=options.debug, stderr_logging=options.debug) - if ShouldPause(): + if ShouldPause() and not options.ignore_pause: logging.debug("Pause has been set, exiting") sys.exit(constants.EXIT_SUCCESS) diff --git a/man/ganeti-watcher.sgml b/man/ganeti-watcher.sgml index 8a024173661f535f80151b860fd1eb5a1f670f5d..d78725392a49c22be147b983eaab7e4aaa95ba0c 100644 --- a/man/ganeti-watcher.sgml +++ b/man/ganeti-watcher.sgml @@ -41,6 +41,10 @@ <cmdsynopsis> <command>&dhpackage; </command> + <arg><option>--debug</option></arg> + <arg><option>--job-age=<replaceable>age</replaceable></option></arg> + <arg><option>--ignore-pause</option></arg> + </cmdsynopsis> </refsynopsisdiv> <refsect1> @@ -53,6 +57,20 @@ and another one that runs on every node. </para> + <para> + If the watcher is disabled at cluster level (via + the <command>gnt-cluster watcher pause</command> command), it + will exit without doing anything. The cluster-level pause can be + overriden via the <option>--ignore-pause</option> option, for + example if during a maintenance the watcher needs to be disabled + in general, but the administrator wants to run it just once. + </para> + + <para> + The <option>--debug</option> option will increase the verbosity + of the watcher and also activate logging to the standard error. + </para> + <refsect2> <title>Master operations</title> @@ -63,11 +81,18 @@ </para> <para> - Its other function is to <quote>repair</quote> DRBD links by + Another function is to <quote>repair</quote> DRBD links by reactivating the block devices of instances which have secondaries on nodes that have been rebooted. </para> + <para> + The watcher will also archive old jobs (older than the age + given via the <option>--job-age</option> option, which + defaults to 6 hours), in order to keep the job queue + manageable. + </para> + </refsect2> <refsect2> @@ -96,7 +121,7 @@ <para> The watcher does synchronous queries but will submit jobs for executing the changes. Due to locking, it could be that the jobs - execute much later than the watcher executes them. + execute much later than the watcher submits them. </para> </refsect2>