From 95887c6702f3faa0dd8b24044b015eb516640ebb Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Fri, 12 Mar 2010 20:33:06 +0300 Subject: [PATCH 1/1] b=22306 t-f: interop 18 <-> 20 ENABLE_QUOTA changes i=Yong.Fan --- lustre/tests/test-framework.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 -- 1.8.3.1