Bug 1263090 - glusterd: add brick command should re-use the port for listening which is freed by remove-brick.
Summary: glusterd: add brick command should re-use the port for listening which is fre...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: RHGS 3.2.0
Assignee: Atin Mukherjee
QA Contact: Byreddy
URL:
Whiteboard: glusterd
Depends On: 1221623 1369766
Blocks: 1351522 1351530
TreeView+ depends on / blocked
 
Reported: 2015-09-15 06:32 UTC by Gaurav Kumar Garg
Modified: 2017-03-23 05:23 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.8.4-1
Doc Type: Bug Fix
Doc Text:
Previously, glusterd managed its portmap table so that ports that had previously been allocated to one daemon could not be reused by other daemons after the original daemon no longer used it, for example, after a brick was removed. This update ensures that ports can be reused by another daemon after they become available.
Clone Of: 1221623
Environment:
Last Closed: 2017-03-23 05:23:47 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1356058 0 unspecified CLOSED glusterd doesn't scan for free ports from base range (49152) if last allocated port is greater than base port 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2017:0486 0 normal SHIPPED_LIVE Moderate: Red Hat Gluster Storage 3.2.0 security, bug fix, and enhancement update 2017-03-23 09:18:45 UTC

Internal Links: 1356058

Description Gaurav Kumar Garg 2015-09-15 06:32:45 UTC
+++ This bug was initially created as a clone of Bug #1221623 +++

Description of problem:

If volume having 4 brick then listening port for that brick will be 49152-49155.
if user perform any remove-brick operation then one of the brick port from 49152-49155 will free (port on which user performing remove brick operation).
after this if user perform add-brick operation then glusterd will assign port after 49155, it is not reusing the port which is freed by remove-brick operation.


Version-Release number of selected component (if applicable):

Mainline

How reproducible:

Always 

Steps to Reproduce:
1. Create and start volume having 2 or more than 2 brick.
2. perform remove-brick operation on any brick.
3. execute gluster volume status command.
3. perform add-brick operation.
4. execute gluster volume status command.


you will see that the brick which you have recently added will use new port.



Actual results:

 brick which you have recently added will use new port

Expected results:

we should re-use the port which is free by remove-brick command.

--- Additional comment from Anand Avati on 2015-05-14 09:06:27 EDT ---

REVIEW: http://review.gluster.org/10785 (glusterd: newly added brick should use the port which is freed by remove-brick) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)

--- Additional comment from Anand Avati on 2015-05-15 09:54:15 EDT ---

REVIEW: http://review.gluster.org/10785 (glusterd: newly added brick should use the port which is freed by remove-brick) posted (#2) for review on master by Gaurav Kumar Garg (ggarg)

--- Additional comment from Anand Avati on 2015-08-11 09:13:37 EDT ---

REVIEW: http://review.gluster.org/10785 (glusterd: newly added brick should use the port which is freed by remove-brick) posted (#3) for review on master by Gaurav Kumar Garg (ggarg)

--- Additional comment from Vijay Bellur on 2015-09-11 04:35:05 EDT ---

REVIEW: http://review.gluster.org/10785 (glusterd: newly added brick should use the port which is freed by remove-brick) posted (#4) for review on master by Gaurav Kumar Garg (ggarg)

Comment 4 Atin Mukherjee 2016-07-18 13:02:59 UTC
http://review.gluster.org/14939 is merged into mainline.

Comment 6 Atin Mukherjee 2016-09-15 12:55:41 UTC
Upstream patch : http://review.gluster.org/14670
                 http://review.gluster.org/15005
(Available in GlusterFS-3.9 as part of rebase)

Downstream patch : https://code.engineering.redhat.com/gerrit/84627
                   https://code.engineering.redhat.com/gerrit/84635

Downstream patches are merged now.

Comment 9 Byreddy 2016-09-27 06:54:24 UTC
Verified the issue using the build - glusterfs-3.8.4-1.

With this Fix, i am seeing the port re-usage happening that is, remove-brick ports are reused when new bricks added using add-brick.

Moving to verified state.

Comment 12 Atin Mukherjee 2017-03-06 05:06:52 UTC
One suggestion here, portmap is maintained by GlusterD, but in the doc text you have highlighted it as RHGS, can we be specific here?

Comment 15 errata-xmlrpc 2017-03-23 05:23:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0486.html


Note You need to log in before you can comment on or make changes to this bug.