From 4f592255e1e7aa1c176652e554bc1346ac447e30 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Wed, 23 Nov 2016 11:50:52 -0800 Subject: [PATCH] test: test-erasure-eio.sh fix recovery testing and enable it Signed-off-by: David Zafman --- src/test/erasure-code/test-erasure-eio.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 "$@" -- 2.39.5