#
source test/ceph-helpers.sh
-source test/mon/mon-test-helpers.sh
-source test/osd/osd-test-helpers.sh
function run() {
local dir=$1
+ shift
export CEPH_MON="127.0.0.1:7101"
export CEPH_ARGS
CEPH_ARGS+="--mon-host=$CEPH_MON "
setup $dir || return 1
- run_mon $dir a --public-addr $CEPH_MON || return 1
+ run_mon $dir a || return 1
# check that erasure code plugins are preloaded
- CEPH_ARGS='' ./ceph --admin-daemon $dir/a/ceph-mon.a.asok log flush || return 1
- grep 'load: jerasure.*lrc' $dir/a/log || return 1
+ CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-mon.a.asok log flush || return 1
+ grep 'load: jerasure.*lrc' $dir/mon.a.log || return 1
for id in $(seq 0 10) ; do
run_osd $dir $id || return 1
done
wait_for_clean || return 1
# check that erasure code plugins are preloaded
CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.0.asok log flush || return 1
- grep 'load: jerasure.*lrc' $dir/osd-0.log || return 1
+ grep 'load: jerasure.*lrc' $dir/osd.0.log || return 1
create_erasure_coded_pool ecpool || return 1
- FUNCTIONS=${FUNCTIONS:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
- for TEST_function in $FUNCTIONS ; do
- if ! $TEST_function $dir ; then
- #cat $dir/a/log
- return 1
- fi
+
+ local funcs=${@:-$(set | sed -n -e 's/^\(TEST_[0-9a-z_]*\) .*/\1/p')}
+ for func in $funcs ; do
+ $func $dir || return 1
done
+
delete_pool ecpool || return 1
teardown $dir || return 1
}
./ceph osd erasure-code-profile set profile-isa \
plugin=isa \
ruleset-failure-domain=osd || return 1
- ./ceph osd pool create $poolname 12 12 erasure profile-isa \
+ ./ceph osd pool create $poolname 1 1 erasure profile-isa \
|| return 1
rados_put_get $dir $poolname || return 1
CEPH_ARGS='' ./ceph --admin-daemon $dir/ceph-osd.${initial_osds[$shardid]}.asok config set \
filestore_fail_eio false || return 1
rados_put_get $dir $poolname $objname || return 1
- check_osd_status ${initial_osds[$shardid]} "down" || return 1
+ wait_for_osd down ${initial_osds[$shardid]} || return 1
# restart the crashed OSDs, note it could crash multiple OSDs,
# since after the primary's crash, the second replica could be
# ./ceph osd erasure-code-profile rm $profile
#}
-main test-erasure-code
+main test-erasure-code "$@"
# Local Variables:
# compile-command: "cd ../.. ; make -j4 && test/erasure-code/test-erasure-code.sh"