Whamcloud - gitweb
LU-12787 tests: skip project quota if it is disabled 97/36997/2
authorAlexander Boyko <c17825@cray.com>
Thu, 19 Sep 2019 13:22:57 +0000 (09:22 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 20 Dec 2019 03:32:29 +0000 (03:32 +0000)
quota_scan touchs project quota in case of errors or logs.
When project quota is not supported, this leads to error:
    Unexpected quotactl error: Operation not supported
    Some errors happened when getting quota info. Some devices
    may be not working or deactivated. The data in "[]" is inaccurate.

The fix adds a check before touching project quota.

Cray-bug-id: LUS-7811
Test-Parameters: testlist=sanity-quota
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: Ia733b666d6937ea9e8e99ef856d2ae1246dc44d1
Reviewed-on: https://review.whamcloud.com/36997
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Alexander Zarochentsev <c17826@cray.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index bde7155..4689018 100755 (executable)
@@ -138,6 +138,7 @@ quota_scan() {
                        xargs stat 2>/dev/null)
+       is_project_quota_supported || return 0
        if [ "$local_ugp" == "a" -o "$local_ugp" == "p" ]; then
                $LFS quota -v -p $TSTPRJID $DIR
                log "Files for project ($TSTPRJID):"