From: David Zafman Date: Wed, 23 Nov 2016 19:50:52 +0000 (-0800) Subject: test: test-erasure-eio.sh fix recovery testing and enable it X-Git-Tag: v11.1.0~133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12170%2Fhead;p=ceph.git test: test-erasure-eio.sh fix recovery testing and enable it Signed-off-by: David Zafman --- diff --git a/src/test/erasure-code/test-erasure-eio.sh b/src/test/erasure-code/test-erasure-eio.sh index 059e6ea8c8c24..b78b420d3ec7b 100755 --- a/src/test/erasure-code/test-erasure-eio.sh +++ b/src/test/erasure-code/test-erasure-eio.sh @@ -122,17 +122,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 @@ -298,7 +300,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 @@ -328,7 +329,6 @@ function TEST_rados_get_with_subreadall_eio_shard_1() { delete_pool $poolname } -DISABLED_TESTS main test-erasure-eio "$@"