From 568f1e807ce1902ae043e4e8c4625399fa7cd8db Mon Sep 17 00:00:00 2001 From: Etienne AUJAMES Date: Fri, 8 Nov 2024 16:47:12 +0100 Subject: [PATCH] LU-17792 tests: fix replay-single 135 "not in REPLAY_LOCKS" Fix test replay-single 135: Error: 'import is not in REPLAY_LOCKS state Wrong OST was selected for object creation due to ZFS replay-barrier: it set the OSD to read-only and then the MDT QOS discard it. Test-Parameters: trivial Test-Parameters: fstype=zfs testlist=replay-single Test-Parameters: fstype=zfs testlist=replay-single Test-Parameters: fstype=ldiskfs testlist=replay-single Test-Parameters: fstype=ldiskfs testlist=replay-single Test-Parameters: fstype=zfs testlist=replay-single env=ONLY=135,ONLY_REPEAT=150 Signed-off-by: Etienne AUJAMES Change-Id: Ia5e1049c1fb75d99f669e38b2ac55ea6de116ddd Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56935 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Alex Deiter Reviewed-by: Oleg Drokin --- lustre/tests/replay-single.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index 3695f2b..d0c1668 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -4996,6 +4996,9 @@ test_135() { # All files to ost1 $LFS setstripe -S $((128 * 1024)) -i 0 $DIR/$tdir + # Create 20 files so we have 20 ost locks + touch $DIR/$tdir/file.{1..20} + # Init all the clients connections (write lastrcv on the OST) clients_up replay_barrier ost1 @@ -5004,11 +5007,13 @@ test_135() { $LCTL set_param ldlm.cancel_unused_locks_before_replay=0 stack_trap "$LCTL set_param $old_replay" EXIT - # Create 20 files so we have 20 ost locks - for i in $(seq 20) ; do - echo blah > $DIR/$tdir/file.${i} & PID+="$! " - done - wait $PID + local old_debug=$($LCTL get_param -n debug) + local old_debug_mb=$($LCTL get_param -n debug_mb) + $LCTL set_param debug_mb=100 debug='+info +ha +dlmtrace' + stack_trap "$LCTL set_param debug_mb=$old_debug_mb debug='$old_debug'" + + printf "%s\n" $DIR/$tdir/file.{1..20} | + xargs -I{} -P20 dd if=/dev/urandom of={} bs=1K count=1 &> /dev/null stop ost1 change_active ost1 @@ -5019,6 +5024,7 @@ test_135() { do_rpc_nodes $(facet_active_host ost1) \ load_module ../libcfs/libcfs/libcfs do_facet ost1 "$LCTL set_param fail_loc=0x32d fail_val=20" + do_facet ost1 "$LCTL set_param debug_mb=100 debug='+info +ha +dlmtrace'" mount_facet ost1 # Now make sure we notice -- 1.8.3.1