Whamcloud - gitweb
LU-16943 tests: fix replay-single/135 under hard failure mode 74/51574/6
authorJian Yu <yujian@whamcloud.com>
Wed, 12 Jul 2023 13:48:41 +0000 (21:48 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Aug 2023 06:32:49 +0000 (06:32 +0000)
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 <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51574
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Deiter <alex.deiter@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/replay-single.sh
lustre/tests/test-framework.sh

index a4c2386..69a478b 100755 (executable)
@@ -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
index eaae1d4..b25fcb4 100755 (executable)
@@ -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