Bug 1342045

Summary: port-map: respect local port range as well as local reserved ports
Product: [Community] GlusterFS Reporter: Prasanna Kumar Kalever <prasanna.kalever>
Component: rpcAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-4.1.3 (or later) Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-29 03:35:30 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:

Description Prasanna Kumar Kalever 2016-06-02 10:32:48 UTC
Description of problem:
respect local port range as well as local reserved ports              
                                                                                
local port ranges:                                                              
-----------------                                                               
The ports mentioned in '/proc/sys/net/ipv4/ip_local_port_range'                 
separated by space defines the local port range that are used by TCP and UDP    
traffic to choose the local port, only a port from this range is allowed to     
use by applications, this makes the life of admin easy to open firewall         
to this range                                                                   
                                                                                
local reserved ports:                                                           
---------------------                                                           
The ports mentioned in '/proc/sys/net/ipv4/ip_local_reserved_ports'             
separated by comma (,) or hyphen (-) are reserved for some specific             
applications this ports can be ingested only by mentioning that port                                                              
number with bind()                                                              
                                                                                
Problem:                                                                        
--------                                                                        
In the existing implementation of portmap registry, the bricks port             
range was strictly limited within 49152-65535 (follow IANA standard)            
and the client port ranges from 0 - 49151 (secure & in-secure).                 
Also we have our own function 'gf_get_reserved_ports' that will read            
admin mentioned reserved ports from '/proc/sys/net/ipv4/ip_local_reserved_ports'
and marks them as false (not to use) in port mapper registry [0 - 65535]        
maintained by glusterd across nodes; but the actual problem is that glusterfs   
don't respect local port range '/proc/sys/net/ipv4/ip_local_port_range'         
which is something disappoints admins.   

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

Comment 1 Vijay Bellur 2016-06-02 10:33:52 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#1) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 2 Vijay Bellur 2016-06-08 10:55:27 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#2) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 3 Vijay Bellur 2016-06-08 12:02:12 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#3) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 4 Vijay Bellur 2016-07-18 07:56:25 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#4) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 5 Vijay Bellur 2016-07-19 11:38:30 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#5) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 6 Worker Ant 2016-08-24 11:05:18 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#6) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 7 Worker Ant 2016-08-30 11:16:52 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#7) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 8 Worker Ant 2016-08-30 14:16:25 UTC
REVIEW: http://review.gluster.org/15358 (port-map: add a testcase for new port map architecture) posted (#2) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 9 Worker Ant 2016-08-31 09:14:51 UTC
REVIEW: http://review.gluster.org/14613 (port-map: respect local port range as well as local reserved ports) posted (#8) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 10 Amar Tumballi 2018-08-29 03:35:30 UTC
This update is done in bulk based on the state of the patch and the time since last activity. If the issue is still seen, please reopen the bug.