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