From 74140e5df4c094f7f0e923e1b82c464b18e8a7cc Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Wed, 12 Jul 2023 21:48:41 +0800 Subject: [PATCH] LU-16943 tests: fix replay-single/135 under hard failure mode This patch fixes replay-single test_135() to load libcfs module on the failover partner node to avoid 'fail_val' setting error. It also fixes the issue that not all of the OSTs are mounted after failing back ost1. Test-Parameters: trivial env=REPLAY_SINGLE_EXCEPT=200 testlist=replay-single Test-Parameters: trivial env=REPLAY_SINGLE_EXCEPT=200 fstype=zfs testlist=replay-single Test-Parameters: trivial env=REPLAY_SINGLE_EXCEPT=200,FAILURE_MODE=HARD \ clientcount=4 mdtcount=1 mdscount=2 osscount=2 \ austeroptions=-R failover=true iscsi=1 \ testlist=replay-single Change-Id: Id46c722a6db9d832829a739f41f7462b32a6d9d9 Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51574 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Deiter Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/tests/replay-single.sh | 7 +++++++ lustre/tests/test-framework.sh | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh index a4c2386..69a478b 100755 --- a/lustre/tests/replay-single.sh +++ b/lustre/tests/replay-single.sh @@ -4965,6 +4965,8 @@ test_135() { #define OBD_FAIL_TGT_REPLAY_RECONNECT 0x32d # Make sure lock replay server side never completes and errors out. + do_rpc_nodes $(facet_active_host ost1) \ + load_module ../libcfs/libcfs/libcfs do_facet ost1 "$LCTL set_param fail_val=20" do_facet ost1 "$LCTL set_param fail_loc=0x32d" @@ -4981,8 +4983,13 @@ test_135() { change_active ost1 wait_for_facet ost1 + do_rpc_nodes $(facet_active_host ost1) \ + load_module ../libcfs/libcfs/libcfs do_facet ost1 "$LCTL set_param fail_loc=0" mount_facet ost1 + unmountoss + mountoss + clients_up || clients_up || error "$LFS df $MOUNT failed" echo blah > $DIR/$tdir/file.test2 rm -rf $DIR/$tdir diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index eaae1d4..b25fcb4 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -5203,6 +5203,15 @@ mountmds() { done } +unmountoss() { + local num + + for num in $(seq $OSTCOUNT); do + stop ost$num -f + rm -f $TMP/ost${num}active + done +} + mountoss() { local num local devname -- 1.8.3.1