74b1de
From 872e344c0ab40c37b1872c32f5d5fddc097a1460 Mon Sep 17 00:00:00 2001
74b1de
From: Atin Mukherjee <amukherj@redhat.com>
74b1de
Date: Mon, 5 Aug 2019 21:16:35 +0530
74b1de
Subject: [PATCH 268/276] rpc/transport: have default listen-port
74b1de
74b1de
With release-6, we now can have transport.socket.listen-port parameter
74b1de
configurable in glusterd.vol. However the default value wasn't defined
74b1de
in the code and this breaks the backward compatibility where if one has
74b1de
a modified glusterd.vol file, then post upgrade the same file will be
74b1de
retained and the new changes introduced as part of the release wouldn't
74b1de
be available in the glusterd.vol. So it's important that for each new
74b1de
options introduced in glusterd.vol file backward compatibility is
74b1de
guaranteed.
74b1de
74b1de
> upstream patch : https://review.gluster.org/#/c/glusterfs/+/23160/
74b1de
74b1de
>Fixes: bz#1737676
74b1de
>Change-Id: I776b28bff786320cda299fe673d824024dc9803e
74b1de
>Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
74b1de
74b1de
BUG: 1734534
74b1de
Change-Id: I776b28bff786320cda299fe673d824024dc9803e
74b1de
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
74b1de
Reviewed-on: https://code.engineering.redhat.com/gerrit/177862
74b1de
Tested-by: RHGS Build Bot <nigelb@redhat.com>
74b1de
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
74b1de
---
74b1de
 rpc/rpc-transport/socket/src/name.c | 2 ++
74b1de
 1 file changed, 2 insertions(+)
74b1de
74b1de
diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c
74b1de
index ca14402..7f18cc4 100644
74b1de
--- a/rpc/rpc-transport/socket/src/name.c
74b1de
+++ b/rpc/rpc-transport/socket/src/name.c
74b1de
@@ -367,6 +367,8 @@ af_inet_server_get_local_sockaddr(rpc_transport_t *this, struct sockaddr *addr,
74b1de
     listen_port_data = dict_get(options, "transport.socket.listen-port");
74b1de
     if (listen_port_data) {
74b1de
         listen_port = data_to_uint16(listen_port_data);
74b1de
+    } else {
74b1de
+        listen_port = GF_DEFAULT_SOCKET_LISTEN_PORT;
74b1de
     }
74b1de
 
74b1de
     listen_host_data = dict_get(options, "transport.socket.bind-address");
74b1de
-- 
74b1de
1.8.3.1
74b1de