Whamcloud - gitweb
LU-4839 tests: Give copytool more time to start 82/12682/6
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Wed, 12 Nov 2014 01:56:28 +0000 (20:56 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 23 Nov 2014 06:57:58 +0000 (06:57 +0000)
Copytool can take some time to start, and if the HSM archive directory
is on a busy NFS server, it can take a bit of time for the initial
opens to occur.  This allows those actions more time to complete which
should give this test a better chance of passing correctly.

Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
testlist=sanity-hsm,sanity-hsm,sanity-hsm,sanity-hsm

Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes,ONLY=60 \
mdtfilesystemtype=ldiskfs mdsfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs \
mdtcount=4 testlist=sanity-hsm,sanity-hsm,sanity-hsm,sanity-hsm

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I28bc57b92c34b4eee07ba34a2d976f2c39dc70dc
Reviewed-on: http://review.whamcloud.com/12682
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Michael MacDonald <michael.macdonald@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index fc48b69..f1e6e52 100755 (executable)
@@ -2695,10 +2695,10 @@ run_test 58 "Truncate a released file will trigger restore"
 
 test_60() {
        # This test validates the fix for LU-4512. Ensure that the -u
-       # option changes the progress reporting interval from the default
-       # (30 seconds) to the user-specified interval.
+       # option changes the progress reporting interval from the
+       # default (30 seconds) to the user-specified interval.
        local interval=5
-       local progress_timeout=$((interval * 3))
+       local progress_timeout=$((interval * 4))
 
        # test needs a new running copytool
        copytool_cleanup
@@ -2708,14 +2708,19 @@ test_60() {
        local f=$DIR/$tdir/$tfile
        local fid=$(make_large_for_progress $f)
 
-       local start_at=$(date +%s)
-       $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f ||
-               error "could not archive file"
-
        local mdtidx=0
        local mdt=${MDT_PREFIX}${mdtidx}
        local mds=mds$((mdtidx + 1))
 
+       # Wait for copytool to register
+       wait_update_facet $mds \
+               "$LCTL get_param -n ${mdt}.hsm.agents | grep -o ^uuid" \
+               uuid 100 || error "coyptool failed to register with $mdt"
+
+       local start_at=$(date +%s)
+       $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f ||
+               error "could not archive file"
+
        local cmd="$LCTL get_param -n ${mdt}.hsm.active_requests"
        cmd+=" | awk '/'$fid'.*action=ARCHIVE/ {print \\\$12}' | cut -f2 -d="