diff options
author | Gaurav Kumar Garg <garg.gaurav52@gmail.com> | 2016-04-13 14:38:11 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-04-14 04:20:53 -0700 |
commit | 401d591de168fdb648663f01c4c4f8ed60777558 (patch) | |
tree | a65cce80fb1805d706a5fe443789b0408ea339fa /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 4910caece70d5c3e28453174b990d2b764359e9a (diff) |
Revert "glusterd: Allocate fresh port on brick (re)start"
This reverts commit 34899d7
Commit 34899d7 introduced a change, where restarting a volume or rebooting
a node result into fresh allocation of brick port. In production
environment generally administrator makes firewall configuration for a
range of ports for a volume. With commit 34899d7, on rebooting of node
or restarting a volume might result into volume start fail because
firewall might block fresh allocated port of a brick and also it will be
difficult in testing because of fresh allocation of port.
Change-Id: I7a90f69e8c267a013dc906b5228ca76e819d84ad
BUG: 1322805
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/13989
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 66054794fd7..ba0539febd4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1730,22 +1730,9 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo, if (gf_is_service_running (pidfile, NULL)) goto connect; - /* Do a pmap registry remove on the older connected port */ - if (brickinfo->port) { - ret = pmap_registry_remove (this, brickinfo->port, - brickinfo->path, - GF_PMAP_PORT_BRICKSERVER, - NULL); - if (ret) { - gf_msg (this->name, GF_LOG_ERROR, 0, - GD_MSG_PMAP_REMOVE_FAIL, "Failed to remove pmap" - "registry for older signin port %d", - brickinfo->port); - goto out; - } - } - - port = pmap_registry_alloc (THIS); + port = brickinfo->port; + if (!port) + port = pmap_registry_alloc (THIS); /* Build the exp_path, before starting the glusterfsd even in valgrind mode. Otherwise all the glusterfsd processes start @@ -1808,22 +1795,9 @@ glusterd_volume_start_glusterfs (glusterd_volinfo_t *volinfo, if (volinfo->transport_type != GF_TRANSPORT_BOTH_TCP_RDMA) { runner_argprintf (&runner, "%d", port); } else { - /* Do a pmap registry remove on the older connected port */ - if (brickinfo->rdma_port) { - ret = pmap_registry_remove (this, brickinfo->rdma_port, - brickinfo->path, - GF_PMAP_PORT_BRICKSERVER, - NULL); - if (ret) { - gf_msg (this->name, GF_LOG_ERROR, 0, - GD_MSG_PMAP_REMOVE_FAIL, "Failed to " - "remove pmap registry for older signin " - "port %d", brickinfo->rdma_port); - goto out; - } - } - rdma_port = pmap_registry_alloc (THIS); - + rdma_port = brickinfo->rdma_port; + if (!rdma_port) + rdma_port = pmap_registry_alloc (THIS); runner_argprintf (&runner, "%d,%d", port, rdma_port); runner_add_arg (&runner, "--xlator-option"); runner_argprintf (&runner, "%s-server.transport.rdma.listen-port=%d", |