From d942492580ebb6830567a5db141a344d7f99ba1d Mon Sep 17 00:00:00 2001 From: sai chaithanya Date: Thu, 22 Jul 2021 13:02:50 +0530 Subject: [PATCH] fix(istgt config): add TCPUserTimeout setting in istgt configuration (#354) (#366) This commit adds new setting called TCPUserTimeout in istgt configuration. Default value of TCPUserTimeout is configured to 120 seconds which means maximum amount of time in seconds that transmitted data may remain unacknowledged, or buffered data may remain untransmitted(due to zero window size) before TCP will forcibly close the corresponding connection and return error event to application. **Why is this change needed**: Current implementation of cStor-istgt allows only one initiator to consume a LUN(volume) at a time. When initiator machine is abruptly powered-off connection is no more active between client & target. To know about client connection status istgt configures TCP_USER_TIMEOUT to 120 seconds during login time. **NOTE**: TCP_USER_TIMEOUT will helpful only if there is packet flow from istgt. Here, if connection remains idle for 20 seconds then istgt will send Nop-In request to client(to check availability). If client is available things will work smooth else if packet is unacknoweldged for 120 secongs then connection will be dropped. Signed-off-by: mittachaitu --- pkg/controllers/volume-mgmt/volume/volume.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controllers/volume-mgmt/volume/volume.go b/pkg/controllers/volume-mgmt/volume/volume.go index 94e3253f..89104051 100644 --- a/pkg/controllers/volume-mgmt/volume/volume.go +++ b/pkg/controllers/volume-mgmt/volume/volume.go @@ -50,6 +50,7 @@ var ( MediaDirectory "/mnt" Timeout 60 NopInInterval 20 + TCPUserTimeout 120 MaxR2T 16 DiscoveryAuthMethod None DiscoveryAuthGroup None