From 7a0de39a60e2eccb24e9a65166189ede5f1cf5b4 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Mon, 18 Oct 2021 13:28:14 -0500 Subject: [PATCH] EX-4087 lipe: no lamigo in hot-pools test_59() In hot-pools test_59(), do not start lamigo. Instead, menaully create a file with the desired striping (uptodate on fast pool, stale on slow pool). Test-Parameters: trivial testlist=hot-pools env=ONLY=59,ONLY_REPEAT=20 Signed-off-by: John L. Hammond Change-Id: I200b1e890a12d59a0ba5cec5f6450704f35b4df8 Reviewed-on: https://review.whamcloud.com/47031 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Jian Yu --- lustre/tests/hot-pools.sh | 48 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/lustre/tests/hot-pools.sh b/lustre/tests/hot-pools.sh index 7119673..0cb4858 100755 --- a/lustre/tests/hot-pools.sh +++ b/lustre/tests/hot-pools.sh @@ -1991,50 +1991,36 @@ test_59() { init_hot_pools_env - # start lamigo - start_lamigo_service - check_lamigo_is_started || error "failed to start lamigo" - stack_trap stop_lamigo_service - - # start lpurge - LPURGE_FREELO=$freelo LPURGE_FREEHI=$freehi start_lpurge_service - check_lpurge_is_started || error "failed to start lpurge" - stack_trap stop_lpurge_service + # create a regular file in source pool + mkdir $td || error "mkdir $td failed" + $LFS setstripe -c -1 -p $LAMIGO_SRC $tf || error "cannot create file" + $LFS mirror extend -N -c -1 -p $LAMIGO_TGT $tf || error "cannot create mirror" $LFS df -h free_MB=$(($(lfs_df -p $LAMIGO_SRC $DIR | awk '/summary/{print $4}') / 1024)) size_MB=$((free_MB * (100 - freelo + 1) / 100)) - # create a regular file in source pool - mkdir $td || error "mkdir $td failed" - cmd="$LFS setstripe -c -1 -p $LAMIGO_SRC $td" - echo $cmd - $cmd || error "'$cmd' failed" - - cmd="$MULTIOP $tf oO_CREAT:O_RDWR:eRE+eU" - echo $cmd - $cmd || error "'$cmd' failed" - - cancel_lru_locks osc - cancel_lru_locks mdc - sleep $((LAMIGO_AGE * 2)) - - # verify the file replicated in target pool - $LFS getstripe $tf - verify_one_lamigo_param 0 replicated 1 - verify_file_mirror $tf 2 - # fill in data yes "${size_MB}M file"| dd bs=1M count=$size_MB iflag=fullblock of=$tf || error "failed to write to $tf" - cmd="$MULTIOP $tf oO_RDWR:eR_E-eUc" + ids=($($LFS getstripe $tf | awk '/lcme_id/{print $2}' | tr '\n' ' ')) + verify_comp_attr lcme_flags "$tf" "${ids[0]}" init,^stale + verify_comp_attr lcme_flags "$tf" "${ids[1]}" init,stale + + # open, apply read lease, pause, expect lease to exist, drop lease, close. + cmd="$MULTIOP $tf oO_RDWR:eR_E+eUc" echo $cmd $cmd & pid=$! + # start lpurge + LPURGE_FREELO=$freelo LPURGE_FREEHI=$freehi start_lpurge_service + check_lpurge_is_started || error "failed to start lpurge" + stack_trap stop_lpurge_service + echo "Before purging:" $LFS df -h $LFS getstripe $tf @@ -2048,13 +2034,13 @@ test_59() { # since the mirror in source pool is the last non-stale mirror, # it cannot be purged because 'lfs mirror split' cannot get WRITE lease. ids=($($LFS getstripe $tf | awk '/lcme_id/{print $2}' | tr '\n' ' ')) - verify_comp_attr lcme_flags $tf ${ids[0]} init,prefer + verify_comp_attr lcme_flags $tf ${ids[0]} init,^stale verify_comp_attr lcme_flags $tf ${ids[1]} init,stale # release the lease lock kill -USR1 $pid && wait $pid || error "$MULTIOP failed" - wait_file_resync $tf + $LFS mirror resync $tf || error "cannot resync mirror" sleep $((LPURGE_INTV * 2)) -- 1.8.3.1