From: Ronen Friedman Date: Tue, 23 Nov 2021 16:10:20 +0000 (+0000) Subject: qa/standalone: osd-scrub-repair.sh: fix expected "not scrubbed since" warnings count X-Git-Tag: v17.1.0~342^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F44072%2Fhead;p=ceph.git qa/standalone: osd-scrub-repair.sh: fix expected "not scrubbed since" warnings count 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 --- diff --git a/qa/standalone/scrub/osd-scrub-repair.sh b/qa/standalone/scrub/osd-scrub-repair.sh index e46bef07a6e6..e4e55cd229f9 100755 --- a/qa/standalone/scrub/osd-scrub-repair.sh +++ b/qa/standalone/scrub/osd-scrub-repair.sh @@ -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