From 5db1bc57996b674b3df19a1ae0ee6b20f4668586 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Fri, 25 Nov 2022 16:13:20 +1100 Subject: [PATCH] LU-15816 tests: use correct ost host to manage failure sanity test_398m sets up striping across 2 OSTs. It ensures that failing IO to either OST individually will fail the total IO. However it sends the command to fail IO for the second OST (OST1) to the host managing the first OST (ost1). If the first 2 OSTs are on the same host, this works. If not, it fails. Also there error messages when testing the second stripe say "first stripe". Lustre-change: https://review.whamcloud.com/49248 Lustre-commit: 6e66cbdb5c8c08193c36262649667747127b6d90 Test-Parameters: trivial env=ONLY=398m Signed-off-by: Mr NeilBrown Change-Id: Ic7085dab2610fa2c044a966fd8de40def0438ca4 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Xinliang Liu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52066 Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/tests/sanity.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 2b4c3a0..41110ac 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -24839,6 +24839,7 @@ test_398m() { # LU-13798 # Set up failure on OST0, the first stripe: #define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e #NB: Fail val is ost # + 1, because we cannot use cfs_fail_val = 0 + # OST0 is on ost1, OST1 is on ost2. # So this fail_val specifies OST0 do_facet ost1 $LCTL set_param fail_loc=0x20e fail_val=1 stack_trap "do_facet ost1 $LCTL set_param fail_loc=0" @@ -24864,13 +24865,13 @@ test_398m() { # LU-13798 # Clear file contents, maintain striping echo > $DIR/$tfile # Set up failure on OST1, second stripe: - do_facet ost1 $LCTL set_param fail_loc=0x20e fail_val=2 - stack_trap "do_facet ost1 $LCTL set_param fail_loc=0" + do_facet ost2 $LCTL set_param fail_loc=0x20e fail_val=2 + stack_trap "do_facet ost2 $LCTL set_param fail_loc=0" dd if=/dev/urandom of=$DIR/$tfile bs=8M count=8 oflag=direct && - error "parallel dio write with failure on first stripe succeeded" + error "parallel dio write with failure on second stripe succeeded" stack_trap "rm -f $DIR/$tfile" - do_facet ost1 $LCTL set_param fail_loc=0 fail_val=0 + do_facet ost2 $LCTL set_param fail_loc=0 fail_val=0 # Place data in file for read dd if=/dev/urandom of=$DIR/$tfile bs=8M count=8 oflag=direct || @@ -24880,7 +24881,7 @@ test_398m() { # LU-13798 #define OBD_FAIL_OST_BRW_READ_BULK 0x20f do_facet ost2 $LCTL set_param fail_loc=0x20f fail_val=2 dd if=$DIR/$tfile of=$DIR/$tfile.2 bs=8M count=8 iflag=direct && - error "parallel dio read with error on first stripe succeeded" + error "parallel dio read with error on second stripe succeeded" rm -f $DIR/$tfile.2 do_facet ost2 $LCTL set_param fail_loc=0 fail_val=0 } -- 1.8.3.1