mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
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:
commit
a7988dfd3f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user