]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: test-erasure-eio.sh fix recovery testing and enable it
authorDavid Zafman <dzafman@redhat.com>
Wed, 23 Nov 2016 19:50:52 +0000 (11:50 -0800)
committerDavid Zafman <dzafman@redhat.com>
Thu, 2 Nov 2017 18:28:02 +0000 (11:28 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 4f592255e1e7aa1c176652e554bc1346ac447e30)

src/test/erasure-code/test-erasure-eio.sh

index aa2b2c3d9b9309d8a2d6491a0854fb99a00330ab..46a7bfcfd0ba716f2fb3493360aa689c18fe1042 100755 (executable)
@@ -121,17 +121,19 @@ function rados_put_get() {
     if [ -n "$recovery" ];
     then
         #
-        # take out the first OSD used to store the object and
-        # check the object can still be retrieved, which implies
-        # recovery
+        # take out the last OSD used to store the object,
+        # bring it back, and check for clean PGs which means
+        # recovery didn't crash the primary.
         #
         local -a initial_osds=($(get_osds $poolname $objname))
         local last=$((${#initial_osds[@]} - 1))
+        # Kill OSD
+        kill_daemons $dir TERM osd.${initial_osds[$last]} >&2 < /dev/null || return 1
         ceph osd out ${initial_osds[$last]} || return 1
         ! get_osds $poolname $objname | grep '\<'${initial_osds[$last]}'\>' || return 1
-        # This will fail since one shard is out and one shard has injected read error
-        rados_get $dir $poolname $objname fail || return 1
         ceph osd in ${initial_osds[$last]} || return 1
+        run_osd $dir ${initial_osds[$last]} || return 1
+        wait_for_clean || return 1
     fi
 
     rm $dir/ORIGINAL
@@ -295,7 +297,6 @@ function TEST_rados_get_bad_size_shard_1() {
     delete_pool $poolname
 }
 
-: <<'DISABLED_TESTS'
 function TEST_rados_get_with_subreadall_eio_shard_0() {
     local dir=$1
     local shard_id=0
@@ -325,7 +326,6 @@ function TEST_rados_get_with_subreadall_eio_shard_1() {
 
     delete_pool $poolname
 }
-DISABLED_TESTS
 
 main test-erasure-eio "$@"