From: Nathaniel Clark Date: Sun, 23 Nov 2014 07:48:10 +0000 (-0800) Subject: LU-4839 tests: Give copytool more time to start X-Git-Tag: 2.5.3.90~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3d9be957e67d81cba1a12aad04245c2716308ee9;p=fs%2Flustre-release.git LU-4839 tests: Give copytool more time to start 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 This patch is back-ported from the following one: Lustre-commit: 6948e80bc149aa689e09334a70941340143fa2ce Lustre-change: http://review.whamcloud.com/12682 Signed-off-by: Nathaniel Clark Change-Id: Ib8828805f52c1f86bf01388606b78ad2c4085acb Reviewed-on: http://review.whamcloud.com/12823 Reviewed-by: Bob Glossman Tested-by: Jenkins Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index cda2e5f..935f8aa 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -2665,10 +2665,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 @@ -2678,14 +2678,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="