Commit 21086aa1 authored by Klaus Aehlig's avatar Klaus Aehlig

Make disk verification optional

In some setups, verification of disks can take a long
time, whereas it is still desirable to run the other
watcher operations more regularly. Hence support this
use case by providing an option to not run disk verification,
allowing for more elaborate cron schedules. Fixes issue 1090.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 167766dc
......@@ -474,6 +474,8 @@ def ParseOptions():
parser.add_option("--no-wait-children", dest="wait_children",
action="store_false",
help="Don't wait for child processes")
parser.add_option("--no-verify-disks", dest="no_verify_disks", default=False,
action="store_true", help="Do not verify disk status")
# See optparse documentation for why default values are not set by options
parser.set_defaults(wait_children=True)
options, args = parser.parse_args()
......@@ -860,7 +862,8 @@ def _GroupWatcher(opts):
started = _CheckInstances(client, notepad, instances, locks)
_CheckDisks(client, notepad, nodes, instances, started)
_VerifyDisks(client, group_uuid, nodes, instances)
if not opts.no_verify_disks:
_VerifyDisks(client, group_uuid, nodes, instances)
except Exception, err:
logging.info("Not updating status file due to failure: %s", err)
raise
......
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