]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/osd-scrub-dump.sh: fix scrub chunk size 50236/head
authorRonen Friedman <rfriedma@redhat.com>
Thu, 23 Feb 2023 15:53:56 +0000 (17:53 +0200)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 26 Feb 2023 13:06:19 +0000 (15:06 +0200)
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 <rfriedma@redhat.com>
qa/standalone/scrub/osd-scrub-dump.sh

index 21808aa9172d07f1f8906941a8e4415c6878f4b0..f21ec78013faba87155f9161c8fd76279b9aa351 100755 (executable)
@@ -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