From d6e4f2843b6fe3a6bb3821d732d9bf9354c51cc8 Mon Sep 17 00:00:00 2001 From: Mikhail Pershin Date: Sat, 9 Nov 2024 16:53:53 +0300 Subject: [PATCH] LU-14947 test: recovery_small/26a fix - issue writes to all OSTs prior test to make sure client exports are not dropped by server as having no updates - set rq_sent when request is dropped by fail_check to reconnect not immediately but in timely manner Test-Parameters: testlist=recovery-small env=ONLY=26a Signed-off-by: Mikhail Pershin Change-Id: Idb219a0453c867903528130669d151bbb6c7bab4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56949 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/ptlrpc/niobuf.c | 4 +++- lustre/tests/recovery-small.sh | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 3dd16be..62faeb0 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -707,8 +707,10 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) LNetInvalidateMDHandle(&bulk_cookie); - if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_DROP_RPC)) + if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_DROP_RPC)) { + request->rq_sent = ktime_get_real_seconds(); RETURN(0); + } if (unlikely(CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_DELAY_RECOV) && lustre_msg_get_opc(request->rq_reqmsg) == MDS_CONNECT && diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 623c947..d4a03db 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -1081,6 +1081,12 @@ test_26a() { # was test_26 bug 5921 - evict dead exports by pinger # make sure all imports are connected and not IDLE do_facet client lfs df > /dev/null + # make sure client will not be discarded by server due to LU-14708 + $LFS setstripe -c -1 -S 64K $MOUNT/$tfile + dd if=/dev/zero of=$MOUNT/$tfile bs=64K count=$OSTCOUNT oflag=sync || + error "dd failed" + sync; sleep 5; sync + # OBD_FAIL_PTLRPC_DROP_RPC 0x505 do_facet client lctl set_param fail_loc=0x505 local before=$(date +%s) -- 1.8.3.1