From: James Nunez Date: Fri, 5 Dec 2014 20:28:01 +0000 (-0800) Subject: LU-5474 tests: sanity-hsm test_90 use local HSM_ARCHIVE X-Git-Tag: 2.5.3.90~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=54a78152b70b54ec574774eef97dcf4c27b06d5b;p=fs%2Flustre-release.git LU-5474 tests: sanity-hsm test_90 use local HSM_ARCHIVE sanity-hsm test 90 suffers from frequent failures due to slow archive speeds. If the existing archive is not local, test 90 now uses a local disk archive to speed the archive process. sanity-hsm test 40 was modified to query the SINGLEAGT node to check if the archive is a local disk for HSM_ARCHIVE. copytool_cleanup was modified to match copytool_setup; remove the contents of $hsm_root and not $hsm_root itself. This patch is back-ported from the following one: Lustre-commit: 8641822bdb248a034bf4065c7e2e60cdb7a47041 Lustre-change: http://review.whamcloud.com/12069 Signed-off-by: James Nunez Change-Id: I3aeaedf21d4b6a1316a9510f8e6f3d19662ccdec Reviewed-on: http://review.whamcloud.com/12963 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Faccini Bruno Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 3c8b73d..0634d95 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -309,7 +309,9 @@ copytool_cleanup() { "$oldstate" 20 || error "mds${mdtno} cdt state is not $oldstate" done - do_facet $facet "rm -rf $hsm_root" + if do_facet $facet "df $hsm_root" >/dev/null 2>&1 ; then + do_facet $facet "rm -rf $hsm_root/*" + fi } copytool_suspend() { @@ -2433,7 +2435,7 @@ test_40() { done # force copytool to use a local/temp archive dir to ensure best # performance vs remote/NFS mounts used in auto-tests - if df --local $HSM_ARCHIVE >/dev/null 2>&1 ; then + if do_facet $SINGLEAGT "df --local $HSM_ARCHIVE" >/dev/null 2>&1 ; then copytool_setup else copytool_setup $SINGLEAGT $MOUNT $HSM_ARCHIVE_NUMBER $TMP/$tdir @@ -2975,7 +2977,14 @@ test_90() { fid=$(copy_file /etc/hosts $f.$i) echo $f.$i >> $FILELIST done - copytool_setup + # force copytool to use a local/temp archive dir to ensure best + # performance vs remote/NFS mounts used in auto-tests + if do_facet $SINGLEAGT "df --local $HSM_ARCHIVE" >/dev/null 2>&1 ; then + copytool_setup + else + local dai=$(get_hsm_param default_archive_id) + copytool_setup $SINGLEAGT $MOUNT $dai $TMP/$tdir + fi # to be sure wait_all_done will not be mislead by previous tests cdt_purge wait_for_grace_delay