Whamcloud - gitweb
LU-5474 tests: sanity-hsm test_90 use local HSM_ARCHIVE 69/12069/11
authorJames Nunez <james.a.nunez@intel.com>
Mon, 17 Nov 2014 18:29:40 +0000 (11:29 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 Dec 2014 13:39:56 +0000 (13:39 +0000)
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 <james.a.nunez@intel.com>
Change-Id: I0beee30b681d4b80f23d33cb42ff5b2944fc21d1
Reviewed-on: http://review.whamcloud.com/12069
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 5ee7105..218012a 100755 (executable)
@@ -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