export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
ONLY=${ONLY:-"$*"}
-# only accounting tests and test 22 are supported for the time being
-ALWAYS_EXCEPT="0 1 2 3 4 5 6 7 8 9 10 11 12 13 15 17 18 19 20 21 23 24 27 30 36 $SANITY_QUOTA_EXCEPT"
+ALWAYS_EXCEPT="$SANITY_QUOTA_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
[ "$ALWAYS_EXCEPT$EXCEPT" ] &&
sync; sync
sync_all_data || true
- # set a small timeout value, to make the quota RPC timedout before
- # the watchdog triggered.
- local timeout
- if at_is_enabled; then
- timeout=$(at_max_get ost)
- at_max_set 20 ost
- else
- timeout=$(do_facet ost1 $LCTL get_param -n timeout)
- do_facet ost1 $LCTL set_param timeout=20
- fi
-
#define QUOTA_DQACQ 601
#define OBD_FAIL_PTLRPC_DROP_REQ_OPC 0x513
lustre_fail mds 0x513 601
$RUNAS $DD of=$TESTFILE count=2 seek=1 oflag=sync conv=notrunc &
DDPID=$!
- echo "Sleep for $timeout"
- sleep $timeout
+ echo "Sleep for $TIMEOUT"
+ sleep $TIMEOUT
# write should be blocked and never finished
if ! ps -p $DDPID > /dev/null 2>&1; then
error "write finished incorrectly!"
fi
- if at_is_enabled; then
- at_max_set $timeout ost
- else
- do_facet ost1 $LCTL set_param timeout=$timeout
- fi
-
lustre_fail mds 0 0
# no watchdog is triggered
echo "Copy admin quota files into MDT0..."
local mntpt=$(facet_mntpt $SINGLEMDS)
local mdt0_fstype=$(facet_fstype $SINGLEMDS)
- echo "$mdt0_node, $mdt0_dev, $mntpt"
- do_node $mdt0_node mount -t $mdt0_fstype $MDS_MOUNT_OPTS $mdt0_dev $mntpt
+ local opt
+ if ! do_node $mdt0_node test -b $mdt0_fstype; then
+ opt="-o loop"
+ fi
+ echo "$mdt0_node, $mdt0_dev, $mntpt, $opt"
+ do_node $mdt0_node mount -t $mdt0_fstype $opt $mdt0_dev $mntpt
do_node $mdt0_node mkdir $mntpt/OBJECTS
do_node $mdt0_node cp $LUSTRE/tests/admin_quotafile_v2.usr $mntpt/OBJECTS
do_node $mdt0_node cp $LUSTRE/tests/admin_quotafile_v2.grp $mntpt/OBJECTS
local proc="qmt.*.md-0x0.glb-usr"
id_cnt=$(do_node $mdt0_node $LCTL get_param -n $proc | wc -l)
- [ $id_cnt -eq 201 ] || error "Migrate inode user limit failed"
+ [ $id_cnt -eq 401 ] || error "Migrate inode user limit failed: $id_cnt"
limit=$(getquota -u 1 global isoftlimit)
[ $limit -eq 1024 ] || error "User inode softlimit: $limit"
limit=$(getquota -u 1 global ihardlimit)
proc="qmt.*.md-0x0.glb-grp"
id_cnt=$(do_node $mdt0_node $LCTL get_param -n $proc | wc -l)
- [ $id_cnt -eq 201 ] || error "Migrate inode group limit failed"
+ [ $id_cnt -eq 401 ] || error "Migrate inode group limit failed: $id_cnt"
limit=$(getquota -g 1 global isoftlimit)
[ $limit -eq 1024 ] || error "Group inode softlimit: $limit"
limit=$(getquota -g 1 global ihardlimit)
proc=" qmt.*.dt-0x0.glb-usr"
id_cnt=$(do_node $mdt0_node $LCTL get_param -n $proc | wc -l)
- [ $id_cnt -eq 201 ] || error "Migrate block user limit failed"
+ [ $id_cnt -eq 401 ] || error "Migrate block user limit failed: $id_cnt"
limit=$(getquota -u 60001 global bsoftlimit)
[ $limit -eq 10485760 ] || error "User block softlimit: $limit"
limit=$(getquota -u 60001 global bhardlimit)
proc="qmt.*.dt-0x0.glb-grp"
id_cnt=$(do_node $mdt0_node $LCTL get_param -n $proc | wc -l)
- [ $id_cnt -eq 201 ] || error "Migrate block user limit failed"
+ [ $id_cnt -eq 401 ] || error "Migrate block user limit failed: $id_cnt"
limit=$(getquota -g 60001 global bsoftlimit)
[ $limit -eq 10485760 ] || error "Group block softlimit: $limit"
limit=$(getquota -g 60001 global bhardlimit)