]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/standalone: osd-scrub-repair.sh: fix expected "not scrubbed since" warnings count 44072/head
authorRonen Friedman <rfriedma@redhat.com>
Tue, 23 Nov 2021 16:10:20 +0000 (16:10 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 23 Nov 2021 16:43:21 +0000 (16:43 +0000)
Following PR#43244, the 'ceph tell pg deep_scrub' now sets both
deep-scrub and "regular" scrub time-stamps. This necessitated a modification
to TEST_scrub_warning, as more PGs in this test are late for their regular scrubbing.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
qa/standalone/scrub/osd-scrub-repair.sh

index e46bef07a6e6429d513a07c184df5f0ea38dd885..e4e55cd229f908a78637ada27d608f55e279c346 100755 (executable)
@@ -5926,10 +5926,15 @@ function TEST_scrub_warning() {
 
     ceph health
     ceph health detail
-    ceph health | grep -q "$deep_scrubs pgs not deep-scrubbed in time" || return 1
-    ceph health | grep -q "$scrubs pgs not scrubbed in time" || return 1
+    ceph health | grep -q " pgs not deep-scrubbed in time" || return 1
+    ceph health | grep -q " pgs not scrubbed in time" || return 1
+
+    # note that the 'ceph tell pg deep_scrub' command now also sets the regular scrub
+    # time-stamp. I.e. - all 'late for deep scrubbing' pgs are also late for
+    # regular scrubbing. For now, we'll allow both responses.
     COUNT=$(ceph health detail | grep "not scrubbed since" | wc -l)
-    if [ "$COUNT" != $scrubs ]; then
+
+    if (( $COUNT != $scrubs && $COUNT != $(expr $scrubs+$deep_scrubs) )); then
       ceph health detail | grep "not scrubbed since"
       return 1
     fi