Bug 1001870

Summary: when rpc.mountd start fail and exit, rpcinfo still display that the mountd registered
Product: Red Hat Enterprise Linux 6 Reporter: JianHong Yin <jiyin>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED NOTABUG QA Contact: Yongcheng Yang <yoyang>
Severity: medium Docs Contact:
Priority: high    
Version: 6.4CC: eguan, knweiss, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1001873 (view as bug list) Environment:
Last Closed: 2016-03-28 19:06:02 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: 1001873    

Description JianHong Yin 2013-08-28 02:40:56 UTC
Description of problem:
when rpc.mountd start fail and exit, rpcinfo still display that the mountd registered. we think before exit should unregister the mountd.

Version-Release number of selected component (if applicable):
versions in RHEL6.4 RHEL7.0

How reproducible:
always

Steps to Reproduce:
1. use the follow code 
2.
3.
service rpcbind restart || service portmap restart
case $(lsb_release -sr) in 5.*) max=1;; 6.*) max=19;; 7.*) max=10;; esac
rpc.mountd -o $max
ps axf | grep -v grep | grep rpc.mountd
rpcinfo -p | grep -w mountd
netstat -utap | grep rpc.mountd

Actual results:
[root@dhcp-13-188 ~]# case $(lsb_release -sr) in 5.*) max=1;; 6.*) max=19;; 7.*) max=10;; esac
[root@dhcp-13-188 ~]# rpc.mountd -o $max
[root@dhcp-13-188 ~]# ps axf | grep -v grep | grep rpc.mountd
[root@dhcp-13-188 ~]# rpcinfo -p | grep -w mountd
    100005    1   udp  57506  mountd
    100005    1   tcp  35168  mountd
    100005    2   udp  46125  mountd
    100005    2   tcp  52789  mountd
    100005    3   udp  57868  mountd
    100005    3   tcp  38658  mountd
[root@dhcp-13-188 ~]# netstat -utap | grep rpc.mountd
[root@dhcp-13-188 ~]# 


Expected results:
[root@dhcp-13-188 ~]# case $(lsb_release -sr) in 5.*) max=1;; 6.*) max=19;; 7.*) max=10;; esac
[root@dhcp-13-188 ~]# rpc.mountd -o $max
[root@dhcp-13-188 ~]# ps axf | grep -v grep | grep rpc.mountd
[root@dhcp-13-188 ~]# rpcinfo -p | grep -w mountd
[root@dhcp-13-188 ~]# netstat -utap | grep rpc.mountd
[root@dhcp-13-188 ~]# 


Additional info:

Comment 2 RHEL Program Management 2013-10-14 02:32:10 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Steve Dickson 2016-03-28 19:06:02 UTC
(In reply to Yongcheng Yang from comment #3)
> This issue still exist in latest nfs-utils-1.2.3-68.el6
> 
> [root@hp-dl380eg8-03 ~]# service rpcbind restart
> Stopping rpcbind: [  OK  ]
> Starting rpcbind: [  OK  ]
> [root@hp-dl380eg8-03 ~]# rpm -q nfs-utils
> nfs-utils-1.2.3-68.el6.x86_64
> [root@hp-dl380eg8-03 ~]# pkill rpc.mountd
> [root@hp-dl380eg8-03 ~]# ps axf | grep -v grep | grep rpc.mountd
> [root@hp-dl380eg8-03 ~]# rpcinfo -p | grep -w mountd
> [root@hp-dl380eg8-03 ~]# rpc.mountd --descriptors 19
> [root@hp-dl380eg8-03 ~]# echo $?
> 1
> [root@hp-dl380eg8-03 ~]# ps axf | grep -v grep | grep rpc.mountd
> [root@hp-dl380eg8-03 ~]# rpcinfo -p | grep -w mountd
>     100005    1   udp  57332  mountd
>     100005    1   tcp  48976  mountd
>     100005    2   udp  56858  mountd
>     100005    2   tcp  33371  mountd
>     100005    3   udp  50663  mountd
>     100005    3   tcp  59799  mountd
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ these should not been showed up

The reason those entries are not being unset is because the
--descriptors 19 cause the daemon to run out of file descriptors
which means no more connections (to rpcbind) can be set up.

using --descriptors 20 works just fine... This is self-induced not a bug! ;-)