From 5b06ba9d46e19b9d750818775c8fb7ba765b2e79 Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Mon, 2 Jan 2023 16:26:15 +0000 Subject: [PATCH] LU-16439 socklnd: clarify error message on timeout When the local peer times out when writing to another peer, prints an explicit error message rather than a generic one. This is make it clearer for admins and easier to debug. Add port to help determining if this is always the same one or not. Test-Parameters: trivial Change-Id: Iaefbc601963b50293743a22ff9329018e8a5fc4f Signed-off-by: Aurelien Degremont Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49540 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Chris Horn Reviewed-by: Cyril Bordage Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lnet/klnds/socklnd/socklnd_cb.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lnet/klnds/socklnd/socklnd_cb.c b/lnet/klnds/socklnd/socklnd_cb.c index 1ebf327..043a655 100644 --- a/lnet/klnds/socklnd/socklnd_cb.c +++ b/lnet/klnds/socklnd/socklnd_cb.c @@ -605,11 +605,15 @@ simulate_error: if (!conn->ksnc_closing) { switch (rc) { case -ECONNRESET: - LCONSOLE_WARN("Host %pISc reset our connection while we were sending data; it may have rebooted.\n", - &conn->ksnc_peeraddr); + LCONSOLE_WARN("Host %pISc reset our connection while we were sending data; it may have rebooted: rc = %d\n", + &conn->ksnc_peeraddr, rc); + break; + case -ETIMEDOUT: + LCONSOLE_WARN("Timeout error while writing to %pISp. Closing socket: rc = %d\n", + &conn->ksnc_peeraddr, rc); break; default: - LCONSOLE_WARN("There was an unexpected network error while writing to %pISc: %d.\n", + LCONSOLE_WARN("There was an unexpected network error while writing to %pISc: rc = %d\n", &conn->ksnc_peeraddr, rc); break; } -- 1.8.3.1