From 8641822bdb248a034bf4065c7e2e60cdb7a47041 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Mon, 17 Nov 2014 11:29:40 -0700 Subject: [PATCH] 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. Test 90 is removed from the exception list. Signed-off-by: James Nunez Change-Id: I0beee30b681d4b80f23d33cb42ff5b2944fc21d1 Reviewed-on: http://review.whamcloud.com/12069 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 5ee7105..218012a 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -13,8 +13,6 @@ export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/utils:$PATH:/sbin:/usr/sbin ONLY=${ONLY:-"$*"} # bug number for skipped test: LU-3815 ALWAYS_EXCEPT="$SANITY_HSM_EXCEPT 34 35 36" -# bug number for skipped test:LU-5474 -ALWAYS_EXCEPT="$ALWAYS_EXCEPT 90" # bug number for skipped test:LU-4178 ALWAYS_EXCEPT="$ALWAYS_EXCEPT 200 221 223b" # bug number for skipped test:LU-3852 @@ -312,7 +310,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() { @@ -2460,7 +2460,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 @@ -3010,7 +3010,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 -- 1.8.3.1