From: Elena Gryaznova Date: Fri, 12 Mar 2010 17:33:06 +0000 (+0300) Subject: b=22306 t-f: interop 18 <-> 20 ENABLE_QUOTA changes X-Git-Tag: v1_8_2_53~19 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=95887c6702f3faa0dd8b24044b015eb516640ebb;p=fs%2Flustre-release.git b=22306 t-f: interop 18 <-> 20 ENABLE_QUOTA changes i=Yong.Fan --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 495d833..5e3a7d8 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -437,11 +437,18 @@ quota_save_version() { local ver=$(tr -c -d "123" <<< $spec) local type=$(tr -c -d "ug" <<< $spec) - $LFS quotaoff -ug $MOUNT # just in case - [ -n "$ver" ] && quota_set_version $ver + local lustre_version=$(get_lustre_version mds) + if [[ $lustre_version = 1.8* ]] ; then + $LFS quotaoff -ug $MOUNT # just in case + [ -n "$ver" ] && quota_set_version $ver + else + echo mds running $lustre_version + [ -n "$ver" -a "$ver" != "3" ] && error "wrong quota version specifier" + fi + [ -n "$type" ] && { $LFS quotacheck -$type $MOUNT || error "quotacheck has failed"; } - do_facet mgs "lctl conf_param ${FSNAME}-MDT*.mdt.quota_type=$spec" + do_facet mgs "lctl conf_param ${FSNAME}-MDT*.md*.quota_type=$spec" local varsvc local osts=$(get_facets OST) for ost in ${osts//,/ }; do @@ -454,7 +461,7 @@ quota_save_version() { quota_type () { local fsname=${1:-$FSNAME} local rc=0 - do_facet mgs lctl get_param mds.${fsname}-MDT*.quota_type || rc=$? + do_facet mgs lctl get_param md*.${fsname}-MDT*.quota_type || rc=$? do_nodes $(comma_list $(osts_nodes)) \ lctl get_param obdfilter.${fsname}-OST*.quota_type || rc=$? return $rc @@ -479,6 +486,7 @@ setup_quota(){ # Suppose that quota type the same on mds and ost local quota_type=$(quota_type | grep MDT | cut -d "=" -f2) [ ${PIPESTATUS[0]} -eq 0 ] || error "quota_type failed!" + echo "[HOST:$HOSTNAME] [old_quota_type:$quota_type] [new_quota_type:$QUOTA_TYPE]" if [ "$quota_type" != "$QUOTA_TYPE" ]; then export old_QUOTA_TYPE=$quota_type quota_save_version $QUOTA_TYPE