From: Ronen Friedman Date: Thu, 23 Feb 2023 15:53:56 +0000 (+0200) Subject: test/osd-scrub-dump.sh: fix scrub chunk size X-Git-Tag: v18.1.0~291^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ce7e132e7dabc0b5ef8add1cd3e2be0e26b37380;p=ceph.git test/osd-scrub-dump.sh: fix scrub chunk size The test performs shallow scrubs, intentionally using small chunk sizes to allow dump commands time to check specific details. Following commit ffda64119fc6165cebffd0b26619ad47b13daf51 (PR#44749), shallow scrubs chunks are controlled by a separate configuration parameter. This PR fixes the test to use the correct parameter. An additional minor change is an adjustment to the test loop sleep time: it is now reduced to guarantee that a dump followed by a counter increase will be performed in more-or-less the scrubs frequency. Fixes: https://tracker.ceph.com/issues/58797 Signed-off-by: Ronen Friedman --- diff --git a/qa/standalone/scrub/osd-scrub-dump.sh b/qa/standalone/scrub/osd-scrub-dump.sh index 21808aa9172d0..f21ec78013fab 100755 --- a/qa/standalone/scrub/osd-scrub-dump.sh +++ b/qa/standalone/scrub/osd-scrub-dump.sh @@ -18,7 +18,7 @@ source $CEPH_ROOT/qa/standalone/ceph-helpers.sh MAX_SCRUBS=4 -SCRUB_SLEEP=2 +SCRUB_SLEEP=3 POOL_SIZE=3 function run() { @@ -31,7 +31,7 @@ function run() { CEPH_ARGS+="--fsid=$(uuidgen) --auth-supported=none " CEPH_ARGS+="--mon-host=$CEPH_MON " CEPH_ARGS+="--osd_max_scrubs=$MAX_SCRUBS " - CEPH_ARGS+="--osd_scrub_chunk_max=$CHUNK_MAX " + CEPH_ARGS+="--osd_shallow_scrub_chunk_max=$CHUNK_MAX " CEPH_ARGS+="--osd_scrub_sleep=$SCRUB_SLEEP " CEPH_ARGS+="--osd_pool_default_size=$POOL_SIZE " # Set scheduler to "wpq" until there's a reliable way to query scrub states @@ -138,7 +138,13 @@ function TEST_recover_unexpected() { break fi total=$(expr $total + $pass) - sleep $(expr $SCRUB_SLEEP \* 2) + if [ $total -gt 0 ]; then + # already saw some reservations, so wait longer to avoid excessive over-counting. + # Note the loop itself takes about 2-3 seconds + sleep $(expr $SCRUB_SLEEP - 2) + else + sleep 0.5 + fi done # Check that there are no more scrubs