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
delete_pool $poolname
}
-: <<'DISABLED_TESTS'
function TEST_rados_get_with_subreadall_eio_shard_0() {
local dir=$1
local shard_id=0
delete_pool $poolname
}
-DISABLED_TESTS
main test-erasure-eio "$@"