summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2017-10-17 21:32:44 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-10-31 18:07:17 +0000
commit7fee47f4ae3b2f6052e36546c50f69ec31a058d0 (patch)
treed8a89463a96d6ea49aa8b9a8867d74323dc893a8 /rpc
parent68b18972fb09be2be32b434f9525cd41e608ac11 (diff)
glusterd: clean up portmap on brick disconnect
GlusterD's portmap entry for a brick is cleaned up when a PMAP_SIGNOUT event is initiated by the brick process at the shutdown. But if the brick process crashes or gets killed through SIGKILL then this event is not initiated and glusterd ends up with a stale port. Since GlusterD's portmap traversal happens both ways, forward for allocation and backward for registry search, there is a possibility that glusterd might end up running with a stale port for a brick which eventually will end up with clients to fail to connect to the bricks. Solution is to clean up the port entry in case the process is down as part of the brick disconnect event. Although with this the handling PMAP_SIGNOUT event becomes redundant in most of the cases, but this is the safeguard method to avoid glusterd getting into the stale port issues. This patch also needs to bring in the changes from change id I705f101739ab1647ff52a92820d478354407264a which is needed for the compilation to go through. > mainline patch : https://review.gluster.org/#/c/18541/ > https://review.gluster.org/#/c/17129/ Change-Id: I04c5be6d11e772ee4de16caf56dbb37d5c944303 BUG: 1507749 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index 8865baf759b..3f659c332d6 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -106,7 +106,7 @@ enum gf_pmap_port_type {
GF_PMAP_PORT_FREE = 0,
GF_PMAP_PORT_FOREIGN, /* it actually means, not sure who is using it, but it is in-use */
GF_PMAP_PORT_LEASED,
- GF_PMAP_PORT_NONE,
+ GF_PMAP_PORT_ANY,
GF_PMAP_PORT_BRICKSERVER, /* port used by brick process */
};
typedef enum gf_pmap_port_type gf_pmap_port_type_t;