Whamcloud - gitweb
LU-17792 tests: fix replay-single 135 "not in REPLAY_LOCKS" 35/56935/5
authorEtienne AUJAMES <etienne.aujames@cea.fr>
Fri, 8 Nov 2024 15:47:12 +0000 (16:47 +0100)
committerOleg Drokin <green@whamcloud.com>
Mon, 9 Dec 2024 06:15:06 +0000 (06:15 +0000)
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 <eaujames@ddn.com>
Change-Id: Ia5e1049c1fb75d99f669e38b2ac55ea6de116ddd
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56935
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Alex Deiter <adeiter@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/replay-single.sh

index 3695f2b..d0c1668 100755 (executable)
@@ -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