Whamcloud - gitweb
LU-15053 tests: reset quota if ENABLE_QUOTA=1 23/49823/5
authorSergey Cheremencev <scherementsev@ddn.com>
Mon, 30 Jan 2023 17:33:08 +0000 (20:33 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Mar 2023 22:14:30 +0000 (22:14 +0000)
Quota limits set in setup_quota() with ENABLE_QUOTA=1
should be cleaned up in the end to avoid failures in
the next sessions

Test-Parameters: testlist=sanity-quota env=ENABLE_QUOTA=yes
Test-Parameters: testgroup=review-dne-part-4 env=ENABLE_QUOTA=yes
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: Ia6b034739cfe800c6661f199420d0a4dbe7110fc
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49823
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/test-framework.sh

index 7ce7fea..516045c 100755 (executable)
@@ -2280,6 +2280,18 @@ ost_quota_type() {
 
 # restore old quota type settings
 restore_quota() {
+       for usr in $QUOTA_USERS; do
+               echo "Setting up quota on $HOSTNAME:$MOUNT for $usr..."
+               for type in u g; do
+                       cmd="$LFS setquota -$type $usr -b 0"
+                       cmd="$cmd -B 0 -i 0 -I 0 $MOUNT"
+                       echo "+ $cmd"
+                       eval $cmd || error "$cmd FAILED!"
+               done
+               # display the quota status
+               echo "Quota settings for $usr : "
+               $LFS quota -v -u $usr $MOUNT || true
+       done
        if [ "$old_MDT_QUOTA_TYPE" ]; then
                if [[ $PERM_CMD == *"set_param -P"* ]]; then
                        do_facet mgs $PERM_CMD \