Commit b4ff41d7 authored by Klaus Aehlig's avatar Klaus Aehlig

Make watcher submit queries low priority

Make the watcher collect its data using low-priority jobs,
to avoid blocking user/admin jobs. Note that repair jobs are
still submitted normal priority. Fixes issue 772.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent ade40547
......@@ -284,7 +284,8 @@ def _VerifyDisks(cl, uuid, nodes, instances):
"""Run a per-group "gnt-cluster verify-disks".
"""
job_id = cl.SubmitJob([opcodes.OpGroupVerifyDisks(group_name=uuid)])
job_id = cl.SubmitJob([opcodes.OpGroupVerifyDisks(
group_name=uuid, priority=constants.OP_PRIO_LOW)])
((_, offline_disk_instances, _), ) = \
cli.PollJob(job_id, cl=cl, feedback_fn=logging.debug)
cl.ArchiveJob(job_id)
......@@ -637,13 +638,15 @@ def _GetGroupData(cl, uuid):
fields=["name", "status", "disks_active", "snodes",
"pnode.group.uuid", "snodes.group.uuid"],
qfilter=[qlang.OP_EQUAL, "pnode.group.uuid", uuid],
use_locking=True),
use_locking=True,
priority=constants.OP_PRIO_LOW),
# Get all nodes in group
opcodes.OpQuery(what=constants.QR_NODE,
fields=["name", "bootid", "offline"],
qfilter=[qlang.OP_EQUAL, "group.uuid", uuid],
use_locking=True),
use_locking=True,
priority=constants.OP_PRIO_LOW),
]
job_id = cl.SubmitJob(job)
......
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