LUSTRE=${LUSTRE:-`dirname $0`/..}
. $LUSTRE/tests/test-framework.sh
init_test_env $@
+init_logging
nobjhi=${nobjhi:-1}
thrhi=${thrhi:-16}
build_test_filter
check_and_setup_lustre
-min_ost_size () {
- $LCTL get_param -n osc.*.kbytesavail | sort -n | head -n1
-}
-
# FIXME: the summary file a bit smaller than OSTSIZE, add estimation
minsize=$(min_ost_size)
if [ $(( size * 1024 )) -ge $minsize ]; then
get_targets () {
local targets
local devs
+ local nid
local oss
for oss in $(osts_nodes); do
devs=$(do_node $oss "lctl dl |grep obdfilter |sort" | awk '{print $4}')
+ nid=$(host_nids_address $oss $NETTYPE)
for d in $devs; do
# if oss is local -- obdfilter-survey needs dev wo/ host
target=$d
- [[ $oss = `hostname` ]] || target=$oss:$target
+ [[ $oss = `hostname` ]] || target=$nid:$target
targets="$targets $target"
done
done
case $case in
disk) targets=$(get_targets);;
netdisk) targets=$(get_targets);;
- network) targets="$(osts_nodes)";;
+ network) targets=$(host_nids_address $(comma_list $(osts_nodes)) $NETTYPE);;
*) error "unknown obdflter-survey case!" ;;
esac
echo $targets
local file=$1
local facet=$2
local varsvc=${facet}_svc
- local dev=$(basename $(do_facet $facet lctl get_param -n *.${!varsvc}.mntdev))
+ local dev=$(ldiskfs_canon "*.${!varsvc}.mntdev" $facet)
# ext4: /proc/fs/jbd2/sda1:8/history
# ext3: /proc/fs/jbd/sdb1/history
}
run_test 3a "Network survey"
-equals_msg `basename $0`: test complete, cleaning up
+complete $(basename $0) $SECONDS
cleanup_echo_devs
check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
+exit_status