check_timeout || return 1
+ # make sure all imports are connected and not IDLE
+ do_facet client lfs df > /dev/null
# OBD_FAIL_PTLRPC_DROP_RPC 0x505
do_facet client lctl set_param fail_loc=0x505
local before=$(date +%s)
# the loser might have to wait for the next ping.
sleep $((TIMEOUT * 2 + TIMEOUT * 3 / 4))
do_facet client lctl set_param fail_loc=0x0
- do_facet client df > /dev/null
+ do_facet client lfs df > /dev/null
local oscs=$(lctl dl | awk '/-osc-/ {print $4}')
check_clients_evicted $before ${oscs[@]}
# = 9 * PING_INTERVAL + PING_INTERVAL
# = 10 PING_INTERVAL = 10 obd_timeout / 4 = 2.5 obd_timeout
# let's wait $((TIMEOUT * 3)) # bug 19887
- local rc=0
- wait_client_evicted ost1 $OST_NEXP $((TIMEOUT * 3)) || \
- error "Client was not evicted by ost" rc=1
- wait_client_evicted $SINGLEMDS $MDS_NEXP $((TIMEOUT * 3)) || \
+ wait_client_evicted ost1 $OST_NEXP $((TIMEOUT * 3)) ||
+ error "Client was not evicted by ost"
+ wait_client_evicted $SINGLEMDS $MDS_NEXP $((TIMEOUT * 3)) ||
error "Client was not evicted by mds"
}
run_test 26b "evict dead exports"
local rc=0
for osc in $oscs; do
- ((rc++))
echo "Check state for $osc"
local evicted=$(do_facet client $LCTL get_param osc.$osc.state |
- tail -n 3 | awk -F"[ [,]" \
- '/EVICTED ]$/ { if (mx<$5) {mx=$5;} } END { print mx }')
+ tail -n 5 | awk -F"[ ,]" \
+ '/EVICTED/ { if (mx<$4) { mx=$4; } } END { print mx }')
if (($? == 0)) && (($evicted > $before)); then
echo "$osc is evicted at $evicted"
- ((rc--))
+ else
+ ((rc++))
+ echo "$osc was not evicted after $before:"
+ do_facet client $LCTL get_param osc.$osc.state |
+ tail -n 8
fi
done