From: Mikhail Pershin Date: Mon, 27 Sep 2010 17:33:03 +0000 (+0400) Subject: b=21313 replace 'mds' with '$SINGLEMDS' in tests X-Git-Tag: 2.0.53.0~32 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=48062a17a0d016a56995eeb021f6f32adb01ac03 b=21313 replace 'mds' with '$SINGLEMDS' in tests i=grev,tappro --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 04d7d2d..1e61d52 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -514,7 +514,7 @@ test_18() { 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 @@ -1326,9 +1326,9 @@ test_35b() { # bug 18674 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 @@ -1343,13 +1343,13 @@ test_35b() { # bug 18674 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" @@ -1702,7 +1702,7 @@ test_44() { # 16317 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) @@ -1881,7 +1881,7 @@ test_49() { # bug 17710 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`" @@ -1903,7 +1903,7 @@ test_49() { # bug 17710 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`" diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh index 3325fd1..6958535 100755 --- a/lustre/tests/replay-ost-single.sh +++ b/lustre/tests/replay-ost-single.sh @@ -191,7 +191,7 @@ test_6() { 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 diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index a7e3512..e022569 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -1561,7 +1561,7 @@ at_cleanup () { 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 @@ -1601,9 +1601,9 @@ at_start() 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 @@ -1626,9 +1626,9 @@ test_65a() #bug 3055 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 @@ -1683,18 +1683,18 @@ test_66a() #bug 3055 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 @@ -1755,9 +1755,9 @@ test_67b() #bug 3055 # 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} diff --git a/lustre/tests/sanity-gss.sh b/lustre/tests/sanity-gss.sh index 7bfa864..cf5685a 100644 --- a/lustre/tests/sanity-gss.sh +++ b/lustre/tests/sanity-gss.sh @@ -388,10 +388,10 @@ run_test 7 "exercise enlarge_reqbuf()" 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 @@ -411,9 +411,9 @@ test_8() 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" @@ -421,13 +421,13 @@ test_8() 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" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 32f46ec..248491e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -477,7 +477,7 @@ test_17h() { #bug 17378 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" @@ -487,7 +487,7 @@ test_17i() { #bug 20018 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 } @@ -1004,7 +1004,7 @@ test_27m() { 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 } @@ -1273,7 +1273,7 @@ test_27y() { [ $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 @@ -1281,7 +1281,7 @@ test_27y() { 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 @@ -1301,7 +1301,7 @@ test_27y() { 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 } @@ -3780,7 +3780,7 @@ test_65k() { # bug11679 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=$? @@ -7150,7 +7150,7 @@ test_163() { 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 $! }