RANTEST=${RANTEST}$*", "
}
+skip_remost()
+{
+ remote_ost_nodsh && log "SKIP: $1: remote OST with nodsh" && return 0
+ return 1
+}
+
+skip_remmds()
+{
+ remote_mds_nodsh && log "SKIP: $1: remote MDS with nodsh" && return 0
+ return 1
+}
+
for NAME in $CONFIGS; do
export NAME MOUNT START CLEAN
. $LUSTRE/tests/cfg/$NAME.sh
setup_if_needed
+ MSKIPPED=0
+ OSKIPPED=0
if [ "$RUNTESTS" != "no" ]; then
title runtests
bash runtests
SANITYN="done"
fi
- remote_mds && log "Remote MDS, skipping LFSCK test" && LFSCK=no
- remote_ost && log "Remote OST, skipping LFSCK test" && LFSCK=no
-
- if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
+ [ "$LFSCK" != "no" ] && remote_mds && log "Remote MDS, skipping LFSCK test" && LFSCK=no && MSKIPPED=1
+ [ "$LFSCK" != "no" ] && remote_ost && log "Remote OST, skipping LFSCK test" && LFSCK=no && OSKIPPED=1
+ if [ "$LFSCK" != "no" ]; then
title lfsck
- E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2`
- if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
- [ "`echo $E2VER | grep cfs`" -o \
- "`echo $E2VER | grep sun`" ]; then
- bash lfscktest.sh
+ if [ -x /usr/sbin/lfsck ]; then
+ bash lfscktest.sh
else
- e2fsck -V
- echo "e2fsck does not support lfsck, skipping"
+ log "$(e2fsck -V)"
+ log "SKIP: e2fsck does not support lfsck"
fi
LFSCK="done"
fi
if [ "$LIBLUSTRE" != "no" ]; then
title liblustre
assert_env MGSNID MOUNT2
- $CLEANUP
- unload_modules
- # Liblustre needs accept=all, noacl
- [ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf
- [ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
-
- LNETOPTS="$(awk '/^options lnet/ { print $0}' $MODPROBECONF | \
- sed 's/^options lnet //g; s/"//g') accept=all" \
- MDS_MOUNT_OPTS=$(echo $MDS_MOUNT_OPTS | sed 's/^[ \t]*//;s/[ \t]*$//') \
- MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" \
- MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS/#,/-o } \
- $SETUP
export LIBLUSTRE_MOUNT_POINT=$MOUNT2
export LIBLUSTRE_MOUNT_RETRY=5
export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
$CLEANUP
done
+[ "$REPLAY_SINGLE" != "no" ] && skip_remmds replay-single && REPLAY_SINGLE=no && MSKIPPED=1
if [ "$REPLAY_SINGLE" != "no" ]; then
title replay-single
bash replay-single.sh
REPLAY_SINGLE="done"
fi
+[ "$CONF_SANITY" != "no" ] && skip_remmds conf-sanity && CONF_SANITY=no && MSKIPPED=1
+[ "$CONF_SANITY" != "no" ] && skip_remost conf-sanity && CONF_SANITY=no && OSKIPPED=1
if [ "$CONF_SANITY" != "no" ]; then
title conf-sanity
bash conf-sanity.sh
CONF_SANITY="done"
fi
+[ "$RECOVERY_SMALL" != "no" ] && skip_remmds recover-small && RECOVERY_SMALL=no && MSKIPPED=1
if [ "$RECOVERY_SMALL" != "no" ]; then
title recovery-small
bash recovery-small.sh
RECOVERY_SMALL="done"
fi
+[ "$REPLAY_OST_SINGLE" != "no" ] && skip_remost replay-ost-single && REPLAY_OST_SINGLE=no && OSKIPPED=1
if [ "$REPLAY_OST_SINGLE" != "no" ]; then
title replay-ost-single
bash replay-ost-single.sh
REPLAY_OST_SINGLE="done"
fi
+[ "$REPLAY_DUAL" != "no" ] && skip_remost replay-dual && REPLAY_DUAL=no && OSKIPPED=1
if [ "$REPLAY_DUAL" != "no" ]; then
title replay-dual
bash replay-dual.sh
REPLAY_DUAL="done"
fi
+[ "$INSANITY" != "no" ] && skip_remmds insanity && INSANITY=no && MSKIPPED=1
+[ "$INSANITY" != "no" ] && skip_remost insanity && INSANITY=no && OSKIPPED=1
if [ "$INSANITY" != "no" ]; then
title insanity
bash insanity.sh -r
INSANITY="done"
fi
+[ "$SANITY_QUOTA" != "no" ] && skip_remmds sanity-quota && SANITY_QUOTA=no && MSKIPPED=1
+[ "$SANITY_QUOTA" != "no" ] && skip_remost sanity-quota && SANITY_QUOTA=no && OSKIPPED=1
if [ "$SANITY_QUOTA" != "no" ]; then
title sanity-quota
bash sanity-quota.sh
SANITY_QUOTA="done"
fi
+[ "$SANITY_SEC" != "no" ] && skip_remmds sanity-sec && SANITY_SEC=no && MSKIPPED=1
+[ "$SANITY_SEC" != "no" ] && skip_remost sanity-sec && SANITY_SEC=no && OSKIPPED=1
if [ "$SANITY_SEC" != "no" ]; then
title sanity-sec
bash sanity-sec.sh
SANITY_SEC="done"
fi
+[ "$SANITY_GSS" != "no" ] && skip_remmds sanity-gss && SANITY_GSS=no && MSKIPPED=1
if [ "$SANITY_GSS" != "no" ]; then
title sanity-gss
bash sanity-gss.sh
echo "Finished at `date` in $((`date +%s` - $STARTTIME))s"
echo "Tests ran: $RANTEST"
print_summary
+[ "$MSKIPPED" = 1 ] && log "FAIL: remote MDS tests skipped" && RC=1
+[ "$OSKIPPED" = 1 ] && log "FAIL: remote OST tests skipped" && RC=1
echo "$0: completed with rc $RC" && exit $RC
OSTSIZE=40000
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
#
[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a "
assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
assert_env LIVE_CLIENT FSNAME
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
# FAIL_CLIENTS list should not contain the LIVE_CLIENT
FAIL_CLIENTS=$(echo " $FAIL_CLIENTS " | sed -re "s/\s+$LIVE_CLIENT\s+/ /g")
init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+remote_mds && skip "remote MDS" && exit 0
+remote_ost && skip "remote OST" && exit 0
+
# if nothing mounted, don't nuke MOUNT variable needed in llmount.sh
WAS_MOUNTED=$(mounted_lustre_filesystems | head -1)
if [ -z "$WAS_MOUNTED" ]; then
ALWAYS_EXCEPT="$ALWAYS_EXCEPT $CONFIG_EXCEPTIONS"
fi
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+
# also long tests: 19, 21a, 21e, 21f, 23, 27
# 1 2.5 2.5 4 4 (min)"
[ "$SLOW" = "no" ] && EXCEPT_SLOW="17 26a 26b 50 51 57"
CLEANUP=${CLEANUP:-""}
cleanup_and_setup_lustre
+
assert_DIR
rm -rf $DIR/[df][0-9]*
#bug 1420
test_9() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
pause_bulk "cp /etc/profile $DIR/$tfile" || return 1
do_facet client "cp $SAMPLE_FILE $DIR/${tfile}.2" || return 2
do_facet client "sync"
}
test_16() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
do_facet client cp $SAMPLE_FILE $DIR
sync
stop_read_ahead
test_17() {
local at_max_saved=0
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
# With adaptive timeouts, bulk_get won't expire until adaptive_timeout_max
if at_is_valid && at_is_enabled; then
at_max_saved=$(at_max_get ost1)
run_test 18a "manual ost invalidate clears page cache immediately"
test_18b() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
do_facet client mkdir -p $DIR/$tdir
f=$DIR/$tdir/$tfile
f2=$DIR/$tdir/${tfile}-2
run_test 18b "eviction and reconnect clears page cache (2766)"
test_18c() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
do_facet client mkdir -p $DIR/$tdir
f=$DIR/$tdir/$tfile
f2=$DIR/$tdir/${tfile}-2
run_test 19b "test expired_lock_main on ost (2867)"
test_20a() { # bug 2983 - ldlm_handle_enqueue cleanup
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir -p $DIR/$tdir
lfs setstripe $DIR/$tdir/${tfile} -i 0 -c 1
multiop_bg_pause $DIR/$tdir/${tfile} O_wc || return 1
run_test 20a "ldlm_handle_enqueue error (should return error)"
test_20b() { # bug 2986 - ldlm_handle_enqueue error during open
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir -p $DIR/$tdir
lfs setstripe $DIR/$tdir/${tfile} -i 0 -c 1
cancel_lru_locks osc
run_test 23 "client hang when close a file after mds crash"
test_24() { # bug 11710 details correct fsync() behavior
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir -p $DIR/$tdir
lfs setstripe $DIR/$tdir -s 0 -i 0 -c 1
cancel_lru_locks osc
test_26a() { # was test_26 bug 5921 - evict dead exports by pinger
# this test can only run from a client on a separate node.
remote_ost || { skip "local OST" && return 0; }
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
remote_mds || { skip "local MDS" && return 0; }
OST_FILE=obdfilter.${ost1_svc}.num_exports
OST_EXP="`do_facet ost1 lctl get_param -n $OST_FILE`"
run_test 26a "evict dead exports"
test_26b() { # bug 10140 - evict dead exports by pinger
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
client_df
zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
sleep 1 # wait connections being established
run_test 26b "evict dead exports"
test_27() {
- remote_mds && { skip "remote MDS" && return 0; }
mkdir -p $DIR/$tdir
writemany -q -a $DIR/$tdir/$tfile 0 5 &
CLIENT_PID=$!
sleep 1
+ local save_FAILURE_MODE=$FAILURE_MODE
FAILURE_MODE="SOFT"
facet_failover $SINGLEMDS
#define OBD_FAIL_OSC_SHUTDOWN 0x407
- lctl set_param fail_loc=0x80000407
+ do_facet $SINGLEMDS lctl set_param fail_loc=0x80000407
# need to wait for reconnect
echo -n waiting for fail_loc
- while [ `lctl get_param -n fail_loc` -eq -2147482617 ]; do
+ while [ $(do_facet $SINGLEMDS lctl get_param -n fail_loc) -eq -2147482617 ]; do
sleep 1
echo -n .
done
+ do_facet $SINGLEMDS lctl get_param -n fail_loc
facet_failover $SINGLEMDS
#no crashes allowed!
kill -USR1 $CLIENT_PID
wait $CLIENT_PID
true
+ FAILURE_MODE=$save_FAILURE_MODE
}
run_test 27 "fail LOV while using OSC's"
}
test_52() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir -p $DIR/$tdir
test_52_guts
rc=$?
# bug 11330 - liblustre application death during I/O locks up OST
test_55() {
- remote_ost && { skip "remote OST" && return 0; }
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
mkdir -p $DIR/$tdir
# first dd should be finished quickly
+ lfs setstripe DIR/$tdir/$tfile-1 -c 1 -i 0
dd if=/dev/zero of=$DIR/$tdir/$tfile-1 bs=32M count=4 &
DDPID=$!
count=0
done
echo "(dd_pid=$DDPID, time=$count)successful"
- #define OBD_FAIL_OST_DROP_REQ 0x21d
- do_facet ost lctl set_param fail_loc=0x0000021d
+ lfs setstripe DIR/$tdir/$tfile-2 -c 1 -i 0
+ #define OBD_FAIL_OST_DROP_REQ 0x21d
+ do_facet ost1 lctl set_param fail_loc=0x0000021d
# second dd will be never finished
dd if=/dev/zero of=$DIR/$tdir/$tfile-2 bs=32M count=4 &
DDPID=$!
echo "(dd_pid=$DDPID, time=$count)successful"
#Recover fail_loc and dd will finish soon
- do_facet ost lctl set_param fail_loc=0
+ do_facet ost1 lctl set_param fail_loc=0
count=0
echo "step3: testing ......"
while [ true ]; do
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-#
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+
[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 5 14"
build_test_filter
run_test 16 "fail MDS during recovery (3571)"
test_17() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
createmany -o $MOUNT1/$tfile- 25
createmany -o $MOUNT2/$tfile-2- 1
ostfailover_HOST=${ostfailover_HOST:-$ost_HOST}
#failover= must be defined in OST_MKFS_OPTIONS if ostfailover_HOST != ost_HOST
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
# Tests that fail on uml
CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
[ "$CPU" = "UML" ] && EXCEPT="$EXCEPT 6"
}
test_6() {
+ remote_mds_nodsh && skip "remote MDS with nodsh" && return 0
+
f=$DIR/$tfile
rm -f $f
sync && sleep 2 && sync # wait for delete thread
CHECK_GRANT=${CHECK_GRANT:-"yes"}
GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
+remote_mds_nodsh && log "SKIP: remote MDS with nodsh" && exit 0
# Skip these tests
# bug number: 17466
run_test 0a "empty replay"
test_0b() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
# this test attempts to trigger a race in the precreation code,
# and must run before any other objects are created on the filesystem
fail ost1
# timeout in MDS/OST recovery RPC will LBUG MDS
test_43() { # bug 2530
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
replay_barrier $SINGLEMDS
# OBD_FAIL_OST_CREATE_NET 0x204
run_test 46 "Don't leak file handle after open resend (3325)"
test_47() { # bug 2824
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
# create some files to make sure precreate has been done on all
# OSTs. (just in case this test is run independently)
createmany -o $DIR/$tfile 20 || return 1
run_test 47 "MDS->OSC failure during precreate cleanup (2824)"
test_48() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
replay_barrier $SINGLEMDS
createmany -o $DIR/$tfile 20 || return 1
# OBD_FAIL_OST_EROFS 0x216
# log_commit_thread vs filter_destroy race used to lead to import use after free
# bug 11658
test_59() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir -p $DIR/$tdir
createmany -o $DIR/$tdir/$tfile-%d 200
sync
#test race llog recovery thread vs llog cleanup
test_61a() { # was test_61
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
mkdir $DIR/$tdir
createmany -o $DIR/$tdir/$tfile-%d 800
replay_barrier ost1
#test race cancel cookie cb vs llog cleanup
test_61c() {
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
# OBD_FAIL_OST_CANCEL_COOKIE_TIMEOUT 0x222
touch $DIR/$tfile
set_nodes_failloc "$(osts_nodes)" 0x80000222
test_65a() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
$LCTL dk > /dev/null
debugsave
test_65b() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
# turn on D_ADAPTTO
debugsave
test_66a() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
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)
test_66b() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
ORIG=$(lctl get_param -n mdc.${FSNAME}-*.timeouts | awk '/network/ {print $4}')
sysctl -w lustre.fail_val=$(($ORIG + 5))
test_67a() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
# sleeping threads may drive values above this
test_67b() #bug 3055
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
#define OBD_FAIL_OST_PAUSE_CREATE 0x223
test_68 () #bug 13813
{
+ remote_ost_nodsh && skip "remote OST with nodsh" && return 0
+
at_start || return 0
local ldlm_enqueue_min=$(find /sys -name ldlm_enqueue_min)
[ -z "$ldlm_enqueue_min" ] && skip "missing /sys/.../ldlm_enqueue_min" && return 0
init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+
[ "$SLOW" = "no" ] && EXCEPT_SLOW="100 101"
# $RUNAS_ID may get set incorrectly somewhere else
init_test_env $@
. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 10 11"
QUOTALOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
SANITYSECLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
FAIL_ON_ERROR=false
+remote_mds_nodsh && skip "remote MDS with nodsh" && exit 0
+remote_ost_nodsh && skip "remote OST with nodsh" && exit 0
+
ID0=${ID0:-500}
ID1=${ID1:-501}
USER0=`cat /etc/passwd|grep :$ID0:$ID0:|cut -d: -f1`
run_test 2e "check chmod on root is propagated to others"
test_3() {
- ( cd $DIR1 ; ln -s this/is/good lnk )
- [ "this/is/good" = "`perl -e 'print readlink("'$DIR2/lnk'");'`" ] || \
- error
+ ( cd $DIR1 ; ln -s this/is/good $tfile )
+ [ "this/is/good" = "`perl -e 'print readlink("'$DIR2/$tfile'");'`" ] ||
+ error "link $DIR2/$tfile not as expected"
}
run_test 3 "symlink on one mtpt, readlink on another ==========="
[ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
[ -z "$LNETOPTS" -a -n "$MODPROBECONF" ] && \
LNETOPTS=$(awk '/^options lnet/ { print $0}' $MODPROBECONF | sed 's/^options lnet //g')
+ echo $LNETOPTS | grep -q "accept=all" || LNETOPTS="$LNETOPTS accept=all";
echo "lnet options: '$LNETOPTS'"
# note that insmod will ignore anything in modprobe.conf
load_module ../lnet/lnet/lnet $LNETOPTS
done
}
-set_nodes_failloc () {
- local nodes=$1
- local node
-
- for node in $nodes ; do
- do_node $node lctl set_param fail_loc=$2
- done
-}
-
cancel_lru_locks() {
$LCTL mark "cancel_lru_locks $1 start"
for d in `lctl get_param -N ldlm.namespaces.*.lru_size | egrep -i $1`; do
remote_mds ()
{
- [ -z "$(lctl dl | grep mdt)" ]
+ local var=${SINGLEMDS}_HOST
+ [ "${!var}" != "$(hostname)" ]
}
remote_mds_nodsh()
remote_ost ()
{
- [ -z "$(lctl dl | grep ost)" ]
+ [ "$ost_HOST" != "$(hostname)" ]
}
remote_ost_nodsh()