From 1dc2a8a09e6aba7dda84d02345126b30387d2cd9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 30 Jan 2020 10:22:49 -0600 Subject: [PATCH] qa/tasks/ceph: only re-request scrub on unscrubbed pgs If we haven't scrubbed everything, we occasinoally re-request scrub in case the request was missed by the OSD (this can happen). But we were re-requesting scrub on ALL pgs, and if they are done in a semi-deterministic order and are slow, then we may never get to the final ones. Signed-off-by: Sage Weil --- qa/tasks/ceph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index d18366bcff4d..00cdd74d0df2 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1295,6 +1295,7 @@ def osd_scrub_pgs(ctx, config): timez = [(stat['pgid'],stat['last_scrub_stamp']) for stat in stats] loop = False thiscnt = 0 + re_scrub = [] for (pgid, tmval) in timez: t = tmval[0:tmval.find('.')].replace(' ', 'T') pgtm = time.strptime(t, '%Y-%m-%dT%H:%M:%S') @@ -1303,13 +1304,14 @@ def osd_scrub_pgs(ctx, config): else: log.info('pgid %s last_scrub_stamp %s %s <= %s', pgid, tmval, pgtm, check_time_now) loop = True + re_scrub.append(pgid) if thiscnt > prev_good: prev_good = thiscnt gap_cnt = 0 else: gap_cnt += 1 if gap_cnt % 6 == 0: - for (pgid, tmval) in timez: + for pgid in re_scrub: # re-request scrub every so often in case the earlier # request was missed. do not do it every time because # the scrub may be in progress or not reported yet and -- 2.47.3