ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 13739
-HEAD_EXCEPT=" 32a 32b "
+# bug number for skipped test: 13739
+HEAD_EXCEPT=" 32a 32b"
# bug number for skipped test:
ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $HEAD_EXCEPT"
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 "
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a 45"
assert_DIR
}
manual_umount_client(){
+ local rc
+ local FORCE=$1
echo "manual umount lustre on ${MOUNT}...."
- do_facet client "umount -d $MOUNT"
+ do_facet client "umount -d ${FORCE} $MOUNT"
+ rc=$?
+ return $rc
}
setup() {
test_2() {
start_ost
- start_mds
+ start_mds
echo "start mds second time.."
start_mds
mount_client $MOUNT
grep " $MOUNT " /etc/mtab && echo "test 5b: mtab before mount" && return 10
mount_client $MOUNT && return 1
grep " $MOUNT " /etc/mtab && echo "test 5b: mtab after failed mount" && return 11
- umount_client $MOUNT
+ umount_client $MOUNT
# stop_mds is a no-op here, and should not fail
cleanup_nocli || return $?
return 0
do_facet ost1 lctl set_param subsystem_debug=\'mds ost\' || return 1
CHECK_PTLDEBUG="`do_facet ost1 lctl get_param -n debug`"
- if [ "$CHECK_PTLDEBUG" ] && [ "$CHECK_PTLDEBUG" = "trace inode" ];then
+ if [ "$CHECK_PTLDEBUG" ] && { \
+ [ "$CHECK_PTLDEBUG" = "trace inode warning error emerg console" ] ||
+ [ "$CHECK_PTLDEBUG" = "trace inode" ]; }; then
echo "lnet.debug success"
else
echo "lnet.debug: want 'trace inode', have '$CHECK_PTLDEBUG'"
stop_ost
stop_ost2
stop_mds
+ #writeconf to remove all ost2 traces for subsequent tests
+ writeconf
}
run_test 21c "start mds between two osts, stop mds last"
test_22() {
- #reformat to remove all logs
- reformat
start_mds
echo Client mount before any osts are in the logs
mount_client $MOUNT
run_test 31 "Connect to non-existent node (shouldn't crash)"
test_32a() {
- # XXX - make this run on client-only systems with real hardware on
- # the OST and MDT
- # there appears to be a lot of assumption here about loopback
- # devices
- # or maybe this test is just totally useless on a client-only system
+ # XXX - make this test verify 1.8 -> 2.0 upgrade is working
+ # XXX - make this run on client-only systems with real hardware on
+ # the OST and MDT
+ # there appears to be a lot of assumption here about loopback
+ # devices
+ # or maybe this test is just totally useless on a client-only system
[ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
[ "$mds_HOST" = "`hostname`" ] || { skip "remote MDS" && return 0; }
[ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
{ skip "remote OST" && return 0; }
- [ -z "$TUNEFS" ] && skip "No tunefs" && return
- local DISK1_4=$LUSTRE/tests/disk1_4.zip
- [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
+ [ -z "$TUNEFS" ] && skip "No tunefs" && return
+ local DISK1_8=$LUSTRE/tests/disk1_8.tgz
+ [ ! -r $DISK1_8 ] && skip "Cannot find $DISK1_8" && return 0
+
+ mkdir -p $TMP/$tdir
+ tar xjvf $DISK1_8 -C $TMP/$tdir || \
+ { skip "Cannot untar $DISK1_8" && return 0; }
- local tmpdir=$TMP/conf32a
- unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
load_modules
lctl set_param debug=$PTLDEBUG
$TUNEFS $tmpdir/mds || error "tunefs failed"
# nids are wrong, so client wont work, but server should start
start mds $tmpdir/mds "-o loop,exclude=lustre-OST0000" || return 3
- local UUID=$(lctl get_param -n mdt.lustre-MDT0000.uuid)
+ local UUID=$(lctl get_param -n mdt.lustre-MDT0000.uuid)
echo MDS uuid $UUID
[ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID"
# With a new good MDT failover nid, we should be able to mount a client
# (but it cant talk to OST)
- local OLDMOUNTOPT=$MOUNTOPT
- MOUNTOPT="exclude=lustre-OST0000"
+ local OLDMOUNTOPT=$MOUNTOPT
+ MOUNTOPT="exclude=lustre-OST0000"
mount_client $MOUNT
MOUNTOPT=$OLDMOUNTOPT
set_and_check client "lctl get_param -n mdc.*.max_rpcs_in_flight" "lustre-MDT0000.mdc.max_rpcs_in_flight" ||
rm -rf $tmpdir || true # true is only for TMP on NFS
}
-run_test 32a "Upgrade from 1.4 (not live)"
+run_test 32a "Upgrade from 1.8 (not live)"
test_32b() {
- # XXX - make this run on client-only systems with real hardware on
- # the OST and MDT
- # there appears to be a lot of assumption here about loopback
- # devices
- # or maybe this test is just totally useless on a client-only system
- [ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
- [ "$mds_HOST" = "`hostname`" ] || { skip "remote MDS" && return 0; }
- [ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
+ # XXX - make this test verify 1.8 -> 2.0 upgrade is working
+ # XXX - make this run on client-only systems with real hardware on
+ # the OST and MDT
+ # there appears to be a lot of assumption here about loopback
+ # devices
+ # or maybe this test is just totally useless on a client-only system
+ [ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
+ [ "$mds_HOST" = "`hostname`" ] || { skip "remote MDS" && return 0; }
+ [ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
{ skip "remote OST" && return 0; }
- [ -z "$TUNEFS" ] && skip "No tunefs" && return
- local DISK1_4=$LUSTRE/tests/disk1_4.zip
- [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
+ [ -z "$TUNEFS" ] && skip "No tunefs" && return
+ local DISK1_8=$LUSTRE/tests/disk1_8.tgz
+ [ ! -r $DISK1_8 ] && skip "Cannot find $DISK1_8" && return 0
+ local tmpdir=$TMP/$tdir
+ mkdir -p $tmpdir
+ tar xjvf $DISK1_8 -C $tmpdir || \
+ { skip "Cannot untar $DISK1_8" && return ; }
- local tmpdir=$TMP/conf32b
- unzip -o -j -d $tmpdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
load_modules
lctl set_param debug=$PTLDEBUG
- NEWNAME=sofia
+ NEWNAME=lustre
# writeconf will cause servers to register with their current nids
$TUNEFS --writeconf --fsname=$NEWNAME $tmpdir/mds || error "tunefs failed"
- start mds $tmpdir/mds "-o loop" || return 3
+ start mds1 $tmpdir/mds "-o loop" || return 3
local UUID=$(lctl get_param -n mdt.${NEWNAME}-MDT0000.uuid)
echo MDS uuid $UUID
- [ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID"
+ [ "$UUID" == "${NEWNAME}-MDT0000_UUID" ] || error "UUID is wrong: $UUID"
- $TUNEFS --mgsnode=`hostname` --fsname=$NEWNAME --writeconf $tmpdir/ost1 || error "tunefs failed"
+ $TUNEFS --mgsnode=`hostname` --writeconf --fsname=$NEWNAME $tmpdir/ost1 || error "tunefs failed"
start ost1 $tmpdir/ost1 "-o loop" || return 5
UUID=$(lctl get_param -n obdfilter.${NEWNAME}-OST0000.uuid)
echo OST uuid $UUID
- [ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID"
+ [ "$UUID" == "${NEWNAME}-OST0000_UUID" ] || error "UUID is wrong: $UUID"
echo "OSC changes should succeed:"
$LCTL conf_param ${NEWNAME}-OST0000.osc.max_dirty_mb=15 || return 7
mount_client $MOUNT
FSNAME=$OLDFS
set_and_check client "lctl get_param -n mdc.*.max_rpcs_in_flight" "${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight" || return 11
- [ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2479747619 779" ] || return 12
+ [ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "94306271 1478" ] || return 12
echo "ok."
cleanup
rm -rf $tmpdir || true # true is only for TMP on NFS
}
-run_test 32b "Upgrade from 1.4 with writeconf"
+run_test 32b "Upgrade from 1.8 with writeconf"
test_33a() { # bug 12333, was test_33
local rc=0
fi
cleanup
- return 0
+ return 0
}
run_test 34b "force umount with failed mds should be normal"
fi
cleanup
- return 0
+ return 0
}
run_test 34c "force umount with failed ost should be normal"
done
do_facet $SINGLEMDS "debugfs -c -R \\\"dump lov_objid $TMP/lov_objid.new\\\" $MDSDEV"
do_facet $SINGLEMDS "od -Ax -td8 $TMP/lov_objid.new"
- [ "$ERROR" = "y" ] && error "old and new files are different after connect" || true
-
+ [ "$ERROR" = "y" ] && error "old and new files are different after connect" || true
+
# check it's updates in sync
umount_client $MOUNT
stop_mds
umount_client $MOUNT
stop_mds
[ "$ERROR" = "y" ] && error "old and new files are different after sync" || true
-
+
log "files compared the same"
cleanup
}
cleanup_nocli
cleanup_gss
+test_45() { #17310
+ setup
+ check_mount || return 2
+ stop_mds
+ df -h $MOUNT &
+ log "sleep 60 sec"
+ sleep 60
+#define OBD_FAIL_PTLRPC_LONG_UNLINK 0x50f
+ do_facet client "lctl set_param fail_loc=0x50f"
+ log "sleep 10 sec"
+ sleep 10
+ manual_umount_client --force || return 3
+ do_facet client "lctl set_param fail_loc=0x0"
+ start_mds
+ mount_client $MOUNT || return 4
+ cleanup
+ return 0
+}
+run_test 45 "long unlink handling in ptlrpcd"
+
+
equals_msg `basename $0`: test complete
[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true