]> git-server-git.apps.pok.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)
committerDavid Zafman <dzafman@redhat.com>
Thu, 5 Dec 2019 23:12:43 +0000 (15:12 -0800)
Fixes: https://tracker.ceph.com/issues/43150
Signed-off-by: David Zafman <dzafman@redhat.com>
qa/standalone/scrub/osd-scrub-snaps.sh

index b37671024eeb05d3a39229d833158b5bc9ab4a23..3f84a8b077ec1dd62b0c1c44e5845f8146fe284a 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
@@ -750,9 +752,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