Merge PR #32988 into master

* refs/pull/32988/head:
	qa/tasks/ceph: only re-request scrub on unscrubbed pgs

Reviewed-by: Neha Ojha <nojha@redhat.com>
This commit is contained in:
Sage Weil 2020-01-30 21:56:05 -06:00
commit a7988dfd3f

View File

@ -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