Commit 49fd9730 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Pause watcher during upgrade



As also suggested in the manual upgrade instructions,
pause the watcher (for 1h) during the upgrade. Fixes
issue 905.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent e290ac5b
......@@ -1841,6 +1841,10 @@ def _UpgradeBeforeConfigurationChange(versionstring):
ToStderr("Failed to completely empty the queue.")
return (False, rollback)
ToStdout("Pausing the watcher for one hour.")
rollback.append(lambda: GetClient().SetWatcherPause(None))
GetClient().SetWatcherPause(time.time() + 60 * 60)
ToStdout("Stopping daemons on master node.")
if not _RunCommandAndReport([pathutils.DAEMON_UTIL, "stop-all"]):
return (False, rollback)
......@@ -1971,6 +1975,10 @@ def _UpgradeAfterConfigurationChange(oldversion):
if not _RunCommandAndReport([pathutils.POST_UPGRADE, oldversion]):
returnvalue = 1
ToStdout("Unpasuing the watcher.")
if not _RunCommandAndReport(["gnt-cluster", "watcher", "continue"]):
returnvalue = 1
ToStdout("Verifying cluster.")
if not _RunCommandAndReport(["gnt-cluster", "verify"]):
returnvalue = 1
......
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