echo $locks
}
+cleanup_34() {
+ local i
+ trap 0
+ do_nodes $(comma_list $(osts_nodes)) \
+ "lctl set_param -n fail_loc=0 2>/dev/null || true"
+ for i in $(seq $OSTCOUNT); do
+ wait_osc_import_state client ost$i FULL
+ done
+}
+
test_34() { #16129
local OPER
local lock_in
local lock_out
+ trap cleanup_34 EXIT RETURN
for OPER in notimeout timeout ; do
rm $DIR1/$tfile 2>/dev/null
lock_in=$(get_ost_lock_timeouts)
fi
fi
done
+ cleanup_34
}
run_test 34 "no lock timeout under IO"
local expected=$3
local ost=$(get_osc_import_name $facet $ost_facet)
- local param="osc.${ost}.ost_server_uuid"
+ local param="osc.${ost}.ost_server_uuid"
+ local i=0
# 1. wait the deadline of client 1st request (it could be skipped)
# 2. wait the deadline of client 2nd request
local maxtime=$(( 2 * $(request_timeout $facet)))
+ #During setup time, the osc might not be setup, it need wait
+ #until list_param can return valid value. And also if there
+ #are mulitple osc entries we should list all of them before
+ #go to wait.
+ local params=$($LCTL list_param $param || true)
+ while [ -z "$params" ]; do
+ if [ $i -ge $maxtime ]; then
+ echo "can't get $param by list_param in $maxtime secs"
+ if [[ $facet != client* ]]; then
+ echo "Go with $param directly"
+ params=$param
+ break
+ else
+ return 1
+ fi
+ fi
+ sleep 1
+ i=$((i + 1))
+ params=$($LCTL list_param $param || true)
+ done
+
if ! do_rpc_nodes "$(facet_host $facet)" \
- _wait_import_state $expected $param $maxtime; then
+ wait_import_state $expected "$params" $maxtime; then
error "import is not in ${expected} state"
return 1
fi