]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: osd-scrub-snaps.sh: Fix race with osd restart and doing a scrub
authorDavid Zafman <dzafman@redhat.com>
Thu, 5 Dec 2019 17:48:09 +0000 (09:48 -0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 13 Feb 2020 14:03:00 +0000 (15:03 +0100)
Fixes: https://tracker.ceph.com/issues/43150
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit cca541d0f9a945a3e3ae2247bab238d7d4cea335)

qa/standalone/scrub/osd-scrub-snaps.sh

index 5f3bb6549636a57b237b4382c255924fc478eccf..04c3f4a51ea0f8227fa482883e9fe9af0c7ab60e 100755 (executable)
@@ -201,9 +201,11 @@ function TEST_scrub_snaps() {
 
     for osd in $(seq 0 $(expr $OSDS - 1))
     do
-      run_osd $dir $osd || return 1
+      activate_osd $dir $osd || return 1
     done
 
+    wait_for_clean || return 1
+
     local pgid="${poolid}.0"
     if ! pg_scrub "$pgid" ; then
         return 1
@@ -811,9 +813,11 @@ function _scrub_snaps_multi() {
 
     for osd in $(seq 0 $(expr $OSDS - 1))
     do
-      run_osd $dir $osd || return 1
+      activate_osd $dir $osd || return 1
     done
 
+    wait_for_clean || return 1
+
     local pgid="${poolid}.0"
     if ! pg_scrub "$pgid" ; then
         return 1