check_mount || return 41
echo "check journal size..."
- local FOUNDSIZE=`do_facet mds "$DEBUGFS -c -R 'stat <8>' $MDSDEV" | awk '/Size: / { print $NF; exit;}'`
+ local FOUNDSIZE=`do_facet $SINGLEMDS "$DEBUGFS -c -R 'stat <8>' $MDSDEV" | awk '/Size: / { print $NF; exit;}'`
if [ $FOUNDSIZE -gt $((32 * 1024 * 1024)) ]; then
log "Success: mkfs creates large journals. Size: $((FOUNDSIZE >> 20))M"
else
log "Set up a fake failnode for the MDS"
FAKENID="127.0.0.2"
- local device=$(do_facet mds "$LCTL get_param -n devices" | \
+ local device=$(do_facet $SINGLEMDS "$LCTL get_param -n devices" | \
awk '($3 ~ "mdt" && $4 ~ "MDT") { print $4 }' | head -1)
- do_facet mds "$LCTL conf_param ${device}.failover.node=$FAKENID" || \
+ do_facet $SINGLEMDS "$LCTL conf_param ${device}.failover.node=$FAKENID" || \
return 1
local at_max_saved=0
log "Injecting EBUSY on MDS"
# Setting OBD_FAIL_MDS_RESEND=0x136
- do_facet mds "$LCTL set_param fail_loc=0x80000136" || return 2
+ do_facet $SINGLEMDS "$LCTL set_param fail_loc=0x80000136" || return 2
log "Stat on a test file"
stat $MOUNT/testdir/test
log "Stop injecting EBUSY on MDS"
- do_facet mds "$LCTL set_param fail_loc=0" || return 3
+ do_facet $SINGLEMDS "$LCTL set_param fail_loc=0" || return 3
rm -f $MOUNT/testdir/test
log "done"
check_mount || return 2
UUID=$($LCTL get_param llite.${FSNAME}*.uuid | cut -d= -f2)
STATS_FOUND=no
- UUIDS=$(do_facet mds "$LCTL get_param mdt.${FSNAME}*.exports.*.uuid")
+ UUIDS=$(do_facet $SINGLEMDS "$LCTL get_param mdt.${FSNAME}*.exports.*.uuid")
for VAL in $UUIDS; do
NID=$(echo $VAL | cut -d= -f1)
CLUUID=$(echo $VAL | cut -d= -f2)
check_mount || return 1
echo "check ldlm_timout..."
- LDLM_MDS="`do_facet mds lctl get_param -n ldlm_timeout`"
+ LDLM_MDS="`do_facet $SINGLEMDS lctl get_param -n ldlm_timeout`"
LDLM_OST1="`do_facet ost1 lctl get_param -n ldlm_timeout`"
LDLM_CLIENT="`do_facet client lctl get_param -n ldlm_timeout`"
setup_noconfig
check_mount || return 7
- LDLM_MDS="`do_facet mds lctl get_param -n ldlm_timeout`"
+ LDLM_MDS="`do_facet $SINGLEMDS lctl get_param -n ldlm_timeout`"
LDLM_OST1="`do_facet ost1 lctl get_param -n ldlm_timeout`"
LDLM_CLIENT="`do_facet client lctl get_param -n ldlm_timeout`"
sleep 2 # ensure we have a fresh statfs
sync
#define OBD_FAIL_MDS_REINT_NET_REP 0x119
- do_facet mds "lctl set_param fail_loc=0x80000119"
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x80000119"
after_dd=`kbytesfree`
log "before: $before after_dd: $after_dd"
(( $before > $after_dd )) || return 1
echo "Cleaning up AT ..."
if [ -n "$ATOLDBASE" ]; then
local at_history=$($LCTL get_param -n at_history)
- do_facet mds "lctl set_param at_history=$at_history" || true
+ do_facet $SINGLEMDS "lctl set_param at_history=$at_history" || true
do_facet ost1 "lctl set_param at_history=$at_history" || true
fi
done
if [ -z "$ATOLDBASE" ]; then
- ATOLDBASE=$(do_facet mds "lctl get_param -n at_history")
+ ATOLDBASE=$(do_facet $SINGLEMDS "lctl get_param -n at_history")
# speed up the timebase so we can check decreasing AT
- do_facet mds "lctl set_param at_history=8" || true
+ do_facet $SINGLEMDS "lctl set_param at_history=8" || true
do_facet ost1 "lctl set_param at_history=8" || true
# sleep for a while to cool down, should be > 8s and also allow
awk '/portal 12/ {print $5}'`
REQ_DELAY=$((${REQ_DELAY} + ${REQ_DELAY} / 4 + 5))
- do_facet mds lctl set_param fail_val=$((${REQ_DELAY} * 1000))
+ do_facet $SINGLEMDS lctl set_param fail_val=$((${REQ_DELAY} * 1000))
#define OBD_FAIL_PTLRPC_PAUSE_REQ 0x50a
- do_facet mds sysctl -w lustre.fail_loc=0x8000050a
+ do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0x8000050a
createmany -o $DIR/$tfile 10 > /dev/null
unlinkmany $DIR/$tfile 10 > /dev/null
# check for log message
at_start || return 0
lctl get_param -n mdc.${FSNAME}-MDT0000-mdc-*.timeouts | grep "portal 12"
# adjust 5s at a time so no early reply is sent (within deadline)
- do_facet mds "sysctl -w lustre.fail_val=5000"
+ do_facet $SINGLEMDS "sysctl -w lustre.fail_val=5000"
#define OBD_FAIL_PTLRPC_PAUSE_REQ 0x50a
- do_facet mds "sysctl -w lustre.fail_loc=0x8000050a"
+ do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000050a"
createmany -o $DIR/$tfile 20 > /dev/null
unlinkmany $DIR/$tfile 20 > /dev/null
lctl get_param -n mdc.${FSNAME}-MDT0000-mdc-*.timeouts | grep "portal 12"
- do_facet mds "sysctl -w lustre.fail_val=10000"
- do_facet mds "sysctl -w lustre.fail_loc=0x8000050a"
+ do_facet $SINGLEMDS "sysctl -w lustre.fail_val=10000"
+ do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0x8000050a"
createmany -o $DIR/$tfile 20 > /dev/null
unlinkmany $DIR/$tfile 20 > /dev/null
lctl get_param -n mdc.${FSNAME}-MDT0000-mdc-*.timeouts | grep "portal 12"
- do_facet mds "sysctl -w lustre.fail_loc=0"
+ do_facet $SINGLEMDS "sysctl -w lustre.fail_loc=0"
sleep 9
createmany -o $DIR/$tfile 20 > /dev/null
unlinkmany $DIR/$tfile 20 > /dev/null
# exhaust precreations on ost1
local OST=$(lfs osts | grep ^0": " | awk '{print $2}' | sed -e 's/_UUID$//')
local mdtosc=$(get_mdtosc_proc_path mds $OST)
- local last_id=$(do_facet mds lctl get_param -n \
+ local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
osc.$mdtosc.prealloc_last_id)
- local next_id=$(do_facet mds lctl get_param -n \
+ local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
osc.$mdtosc.prealloc_next_id)
mkdir -p $DIR/$tdir/${OST}
test_8()
{
- local ATHISTORY=$(do_facet mds "find /sys/ -name at_history")
- local ATOLDBASE=$(do_facet mds "cat $ATHISTORY")
+ local ATHISTORY=$(do_facet $SINGLEMDS "find /sys/ -name at_history")
+ local ATOLDBASE=$(do_facet $SINGLEMDS "cat $ATHISTORY")
local REQ_DELAY
- do_facet mds "echo 8 >> $ATHISTORY"
+ do_facet $SINGLEMDS "echo 8 >> $ATHISTORY"
mkdir -p $DIR/d8
chmod a+w $DIR/d8
REQ_DELAY=$((${REQ_DELAY} + ${REQ_DELAY} / 4 + 5))
# sleep sometime in ctx handle
- do_facet mds lctl set_param fail_val=$REQ_DELAY
+ do_facet $SINGLEMDS lctl set_param fail_val=$REQ_DELAY
#define OBD_FAIL_SEC_CTX_HDL_PAUSE 0x1204
- do_facet mds lctl set_param fail_loc=0x1204
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x1204
$RUNAS $LFS flushctx $MOUNT || error "can't flush context on $MOUNT"
TOUCHPID=$!
echo "waiting for touch (pid $TOUCHPID) to finish..."
sleep 2 # give it a chance to really trigger context init rpc
- do_facet mds sysctl -w lustre.fail_loc=0
+ do_facet $SINGLEMDS sysctl -w lustre.fail_loc=0
wait $TOUCHPID || error "touch should have succeeded"
$LCTL dk | grep "Early reply #" || error "No early reply"
debugrestore
- do_facet mds "echo $ATOLDBASE >> $ATHISTORY" || true
+ do_facet $SINGLEMDS "echo $ATOLDBASE >> $ATHISTORY" || true
}
run_test 8 "Early reply sent for slow gss context negotiation"
mkdir -p $DIR/$tdir
$SETSTRIPE $DIR/$tdir -c -1
#define OBD_FAIL_MDS_LOV_PREP_CREATE 0x141
- do_facet mds lctl set_param fail_loc=0x80000141
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x80000141
touch $DIR/$tdir/$tfile || true
}
run_test 17h "create objects: lov_free_memmd() doesn't lbug"
local foo=$DIR/$tdir/$tfile
ln -s $foo $foo || error "create symlink failed"
#define OBD_FAIL_MDS_READLINK_EPROTO 0x143
- do_facet mds lctl set_param fail_loc=0x80000143
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x80000143
ls -l $foo && error "error not detected"
return 0
}
run_test 27m "create file while OST0 was full =================="
sleep_maxage() {
- local DELAY=$(do_facet mds lctl get_param -n lov.*.qos_maxage | head -n 1 | awk '{print $1 * 2}')
+ local DELAY=$(do_facet $SINGLEMDS lctl get_param -n lov.*.qos_maxage | head -n 1 | awk '{print $1 * 2}')
sleep $DELAY
}
[ $fcount -eq 0 ] && skip "not enough space on OST0" && return
[ $fcount -gt $OSTCOUNT ] && fcount=$OSTCOUNT
- MDS_OSCS=`do_facet mds lctl dl | awk '/[oO][sS][cC].*md[ts]/ { print $4 }'`
+ MDS_OSCS=`do_facet $SINGLEMDS lctl dl | awk '/[oO][sS][cC].*md[ts]/ { print $4 }'`
OFFSET=$(($OSTCOUNT-1))
OST=-1
for OSC in $MDS_OSCS; do
OST=`osc_to_ost $OSC`
} else {
echo $OSC "is Deactivate:"
- do_facet mds lctl --device %$OSC deactivate
+ do_facet $SINGLEMDS lctl --device %$OSC deactivate
} fi
done
for OSC in $MDS_OSCS; do
[ `osc_to_ost $OSC` != $OST ] && {
echo $OSC "is activate"
- do_facet mds lctl --device %$OSC activate
+ do_facet $SINGLEMDS lctl --device %$OSC activate
}
done
}
STRIPE_INDEX=`do_facet $SINGLEMDS lctl get_param -n lov.*md*.target_obd |
grep $STRIPE_OST | awk -F: '{print $1}' | head -n 1`
- [ -f $DIR/$tdir/${STRIPE_INDEX} ] && continue
+ [ -f $DIR/$tdir/${STRIPE_INDEX} ] && continue
echo "$SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} -i ${STRIPE_INDEX} -c 1"
do_facet client $SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} -i ${STRIPE_INDEX} -c 1
RC=$?
sleep 1
local uuid=$($LCTL get_param -n mdc.${FSNAME}-MDT0000-mdc-*.uuid)
# this proc file is temporary and linux-only
- do_facet mds lctl set_param mdt.${FSNAME}-MDT0000.mdccomm=$uuid ||\
+ do_facet $SINGLEMDS lctl set_param mdt.${FSNAME}-MDT0000.mdccomm=$uuid ||\
error "kernel->userspace send failed"
kill -INT $!
}