Bug 1263090

Summary: glusterd: add brick command should re-use the port for listening which is freed by remove-brick.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Gaurav Kumar Garg <ggarg>
Component: glusterdAssignee: Atin Mukherjee <amukherj>
Status: CLOSED ERRATA QA Contact: Byreddy <bsrirama>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: amukherj, lbailey, nlevinki, rcyriac, rhinduja, rhs-bugs, sasundar, smohan, vbellur
Target Milestone: ---   
Target Release: RHGS 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: glusterd
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.
Story Points: ---
Clone Of: 1221623 Environment:
Last Closed: 2017-03-23 05:23:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1221623, 1369766    
Bug Blocks: 1351522, 1351530    

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