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 <sage@redhat.com>
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')
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