e7a346
From 74aaa257df25b70711bf962642ab2f8b3d063634 Mon Sep 17 00:00:00 2001
e7a346
From: Xavi Hernandez <xhernandez@redhat.com>
e7a346
Date: Thu, 13 Sep 2018 15:44:15 +0200
e7a346
Subject: [PATCH 374/385] socket: set 42 as default tpc-user-timeout
e7a346
e7a346
> Upstream: https://review.gluster.org/21170
e7a346
> BUG: 1628605
e7a346
> Change-Id: Ib8ad7c4ac6aac725b01a78f8c3d10cf4063d2ee6
e7a346
e7a346
The 'tcp-user-timeout' option is define in the 'socket' module, but it's
e7a346
configured in 'protocol/server' and 'protocol/client', which are the
e7a346
parents of the 'socket' module.
e7a346
e7a346
However, current options management logic only takes into consideration
e7a346
default values specified in the 'socket' module itself, ignoring values
e7a346
defined in the owner xlator.
e7a346
e7a346
This patch simply sets the default value of tcp-user-timeout in the
e7a346
'socket' module so that server and client use the expected value.
e7a346
e7a346
Change-Id: Ib8ad7c4ac6aac725b01a78f8c3d10cf4063d2ee6
e7a346
BUG: 1623874
e7a346
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/150699
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e7a346
---
e7a346
 rpc/rpc-transport/socket/src/socket.c | 6 +++---
e7a346
 1 file changed, 3 insertions(+), 3 deletions(-)
e7a346
e7a346
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
e7a346
index b98efdc..243d49c 100644
e7a346
--- a/rpc/rpc-transport/socket/src/socket.c
e7a346
+++ b/rpc/rpc-transport/socket/src/socket.c
e7a346
@@ -3854,7 +3854,7 @@ reconfigure (rpc_transport_t *this, dict_t *options)
e7a346
         int               ret           = 0;
e7a346
         uint32_t          backlog       = 0;
e7a346
         uint64_t          windowsize    = 0;
e7a346
-        uint32_t          timeout       = 0;
e7a346
+        uint32_t          timeout       = 42;
e7a346
         int               keepaliveidle  = GF_KEEPALIVE_TIME;
e7a346
         int               keepaliveintvl = GF_KEEPALIVE_INTERVAL;
e7a346
         int               keepalivecnt   = GF_KEEPALIVE_COUNT;
e7a346
@@ -4083,7 +4083,7 @@ socket_init (rpc_transport_t *this)
e7a346
         gf_boolean_t      tmp_bool = 0;
e7a346
         uint64_t          windowsize = GF_DEFAULT_SOCKET_WINDOW_SIZE;
e7a346
         char             *optstr = NULL;
e7a346
-        uint32_t          timeout = 0;
e7a346
+        uint32_t          timeout = 42;
e7a346
         int               keepaliveidle  = GF_KEEPALIVE_TIME;
e7a346
         int               keepaliveintvl = GF_KEEPALIVE_INTERVAL;
e7a346
         int               keepalivecnt   = GF_KEEPALIVE_COUNT;
e7a346
@@ -4623,7 +4623,7 @@ struct volume_options options[] = {
e7a346
         },
e7a346
         { .key   = {"transport.tcp-user-timeout"},
e7a346
           .type  = GF_OPTION_TYPE_INT,
e7a346
-          .default_value = "0"
e7a346
+          .default_value = "42"
e7a346
         },
e7a346
         { .key   = {"transport.socket.nodelay"},
e7a346
           .type  = GF_OPTION_TYPE_BOOL,
e7a346
-- 
e7a346
1.8.3.1
e7a346