LGTM, thanks.
On Mon, Mar 24, 2014 at 2:22 PM, Klaus Aehlig <[email protected]> wrote: > 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: Klaus Aehlig <[email protected]> > --- > lib/watcher/__init__.py | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/lib/watcher/__init__.py b/lib/watcher/__init__.py > index 4c2d019..bb39b25 100644 > --- a/lib/watcher/__init__.py > +++ b/lib/watcher/__init__.py > @@ -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) > -- > 1.9.1.423.g4596e3a > >
