Bug 1466551

Summary: [GSS] glusterfs process will listen port which is reserved in net.ipv4.ip_local_reserved_ports
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: WenhanShi <wenshi>
Component: gluster-nfsAssignee: Jiffin <jthottan>
Status: CLOSED WONTFIX QA Contact: Manisha Saini <msaini>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.2CC: jthottan, ndevos, rhs-bugs, sankarshan, storage-qa-internal, vbellur, wenshi, wliu
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-19 04:24:25 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:    
Bug Blocks: 1472361    

Description WenhanShi 2017-06-30 01:20:07 UTC
Description of problem:
glusterfs process will listen port which is reserved in net.ipv4.ip_local_reserved_ports

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

How reproducible:
every time

Steps to Reproduce:
1. reserved ports by follow steps.
  # vi /etc/sysctl.conf
  Add the line at the bottom of the file:
  net.ipv4.ip_local_reserved_ports=700-900
  Save and exit the file (:wq!)
  # sysctl -p
  # sysctl -a | grep ip_local_reserved_ports
  net.ipv4.ip_local_reserved_ports = 700-900

2. create a gluster volume and start it
3. gluster volume set VOL nfs.disable on
4. check the output of "netstat -anop | grep gluster"

Actual results:
In range 700-900, no port should be used.

Expected results:
glusterfs process will listen port by tcp and udp in the range.

Additional info:
A similar bug has been fixed in 2012 year
  https://bugzilla.redhat.com/show_bug.cgi?id=868715

Comment 7 Niels de Vos 2017-07-21 09:43:41 UTC
These ports might be related to Gluster/NFS. It would be good to know what services are listening on those ports. Gluster/NFS requests a port from rpcbind (the portmapper) and uses that. In case rpcbind does not honour the net.ipv4.ip_local_reserved_ports sysctl option, Gluster is probably not responsible for it.

Could you check the rpcbind registration with 'rpcbind -p $SERVER' and let us know if these ports have been registered with rpcbind?

Comment 8 WenhanShi 2017-07-23 23:57:23 UTC
(In reply to Niels de Vos from comment #7)
> These ports might be related to Gluster/NFS. It would be good to know what
> services are listening on those ports. Gluster/NFS requests a port from
> rpcbind (the portmapper) and uses that. In case rpcbind does not honour the
> net.ipv4.ip_local_reserved_ports sysctl option, Gluster is probably not
> responsible for it.
> 
> Could you check the rpcbind registration with 'rpcbind -p $SERVER' and let
> us know if these ports have been registered with rpcbind?

Hi, I didn't find a rpcbind with a "-p" option, do you mean "rpcinfo -p"? Here is the output.

[root@node-01876647 ~]# sysctl -a | grep ip_local_res
net.ipv4.ip_local_reserved_ports = 700-900
[root@node-01876647 ~]# netstat -anop | grep gluster
tcp        0      0 0.0.0.0:756             0.0.0.0:*               LISTEN      6932/glusterfs       off (0.00/0/0)
....
udp        0      0 0.0.0.0:754             0.0.0.0:*                           6932/glusterfs       off (0.00/0/0)
....

[root@node-01876647 ~]# rpcinfo -p
   program vers proto   port  service
....
    100021    1   udp    754  nlockmgr
    100021    1   tcp    756  nlockmgr

Comment 18 Red Hat Bugzilla 2023-09-15 00:02:51 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days