1
0
mirror of https://github.com/ceph/ceph synced 2024-12-22 19:34:30 +00:00

qa/tasks/ceph: osd_scrub_pgs: reissue scrub requests in loop

The scrub commands are not reliable: if the OSD doesn't happen to
be connected at the time the command is issued it may not get
delivered.  Re-request scrubs for each PG that has not yet been
scrubbed so that we don't wait forever when the original request
is dropped.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-06-19 11:59:10 -04:00
parent 32361a798f
commit cc902a1f6b

View File

@ -1078,6 +1078,13 @@ def osd_scrub_pgs(ctx, config):
gap_cnt = 0
else:
gap_cnt += 1
if gap_cnt % 6 == 0:
for (pgid, tmval) in timez:
# re-request scrub every so often in case the earlier
# request was missed. do not do it everytime because
# the scrub may be in progress or not reported yet and
# we will starve progress.
manager.raw_cluster_cmd('pg', 'deep-scrub', pgid)
if gap_cnt > retries:
raise RuntimeError('Exiting scrub checking -- not all pgs scrubbed.')
if loop: