Whamcloud - gitweb
LU-4839 tests: wait for copytool start sanity-hsm/60 31/13731/2
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Wed, 11 Feb 2015 13:48:12 +0000 (08:48 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 3 Mar 2015 16:48:15 +0000 (16:48 +0000)
Wait for copytool to start transfer before checking progress interval.
copytool, in certain environments (heavily loaded NFS backed target),
can take an extrodinarly long time (>30s) to open destination file.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I56908a16240b61a51fe1395a8104eddc6aa3131f
Reviewed-on: http://review.whamcloud.com/13731
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 3624f30..c2c84ef 100755 (executable)
@@ -2803,6 +2803,16 @@ test_60() {
        $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f ||
                error "could not archive file"
 
        $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f ||
                error "could not archive file"
 
+       local agent=$(facet_active_host $SINGLEAGT)
+       local prefix=$TESTLOG_PREFIX
+       [[ -z "$TESTNAME" ]] || prefix=$prefix.$TESTNAME
+       local copytool_log=$prefix.copytool_log.$agent.log
+
+
+       wait_update $agent \
+           "grep -o start.copy $copytool_log" "start copy" 100 ||
+               error "copytool failed to start"
+
        local cmd="$LCTL get_param -n ${mdt}.hsm.active_requests"
        cmd+=" | awk '/'$fid'.*action=ARCHIVE/ {print \\\$12}' | cut -f2 -d="
 
        local cmd="$LCTL get_param -n ${mdt}.hsm.active_requests"
        cmd+=" | awk '/'$fid'.*action=ARCHIVE/ {print \\\$12}' | cut -f2 -d="