Bug 1010634

Summary: /etc/init.d/nfs should automatically mount the /proc/fs/nfsd (if not mounted)
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: high Docs Contact:
Priority: high    
Version: 6.5CC: eguan, jiyin, swhiteho, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-11 22:43:33 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:

Description JianHong Yin 2013-09-22 07:51:40 UTC
Description of problem:
/etc/init.d/nfs should automatically mount the /proc/fs/nfsd (if not mounted)

Version-Release number of selected component (if applicable):
Now RHEL6.4 RHEL6.5 test fail;
RHEL7.0 test OK. RHEL5.0 does not involve

How reproducible:
100%

Steps to Reproduce:
1. service nfs start; service nfs stop;
2. umount /proc/fs/nfsd
3. service nfs restart

Actual results:
[root@intel-canoepass-01 ~]# service nfs restart
Shutting down NFS daemon: [  OK  ]
Shutting down NFS mountd: [  OK  ]
Shutting down NFS quotas: [  OK  ]
Shutting down NFS services:  [  OK  ]
Shutting down RPC idmapd: [  OK  ]
Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS mountd: [  OK  ]
Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
[  OK  ]
Starting RPC idmapd: [  OK  ]

Expected results:
when start, should automatically mount the /proc/fs/nfsd;

Additional info:
In RHEL7.0 works OK.

Comment 1 JianHong Yin 2013-09-22 07:59:31 UTC
[root@intel-canoepass-01 ~]# diff /etc/init.d/nfs.orig /etc/init.d/nfs -pNur
--- /etc/init.d/nfs.orig        2013-09-22 03:54:23.688358359 -0400
+++ /etc/init.d/nfs     2013-09-22 03:57:08.237767398 -0400
@@ -85,6 +85,8 @@ case "$1" in
                /sbin/modprobe nfsd
                [ -n "$RDMA_PORT" ] && /sbin/modprobe svcrdma
        }
+       mountpoint -q /proc/fs/nfsd || mount -t nfsd nfsd /proc/fs/nfsd 2>/dev/null
+
        # Set v4 grace period if requested
        [ -n "$NFSD_V4_GRACE" ] && {
                echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
[root@intel-canoepass-01 ~]# 


this patch can work for me.

Comment 3 Steve Dickson 2013-09-22 09:16:19 UTC
(In reply to Yin.JianHong from comment #0)
> Description of problem:
> /etc/init.d/nfs should automatically mount the /proc/fs/nfsd (if not mounted)
> 
> Version-Release number of selected component (if applicable):
> Now RHEL6.4 RHEL6.5 test fail;
> RHEL7.0 test OK. RHEL5.0 does not involve
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1. service nfs start; service nfs stop;
> 2. umount /proc/fs/nfsd
> 3. service nfs restart
> 
> Actual results:
> [root@intel-canoepass-01 ~]# service nfs restart
> Shutting down NFS daemon: [  OK  ]
> Shutting down NFS mountd: [  OK  ]
> Shutting down NFS quotas: [  OK  ]
> Shutting down NFS services:  [  OK  ]
> Shutting down RPC idmapd: [  OK  ]
> Starting NFS services:  [  OK  ]
> Starting NFS quotas: [  OK  ]
> Starting NFS mountd: [  OK  ]
> Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No
> such file or directory).
> Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart
> rpc.nfsd to correct the problem
The question is why is /proc/fs/nfsd no longer getting mounted
when he nfsd kernel module is loaded?

Also I'm not able to reproduce this with nfs-utils-1.2.3-38

Comment 4 JianHong Yin 2013-09-22 09:31:44 UTC
(In reply to Steve Dickson from comment #3)
> (In reply to Yin.JianHong from comment #0)
> > Description of problem:
> > /etc/init.d/nfs should automatically mount the /proc/fs/nfsd (if not mounted)
> > 
> > Version-Release number of selected component (if applicable):
> > Now RHEL6.4 RHEL6.5 test fail;
> > RHEL7.0 test OK. RHEL5.0 does not involve
> > 
> > How reproducible:
> > 100%
> > 
> > Steps to Reproduce:
> > 1. service nfs start; service nfs stop;
> > 2. umount /proc/fs/nfsd
> > 3. service nfs restart
> > 
> > Actual results:
> > [root@intel-canoepass-01 ~]# service nfs restart
> > Shutting down NFS daemon: [  OK  ]
> > Shutting down NFS mountd: [  OK  ]
> > Shutting down NFS quotas: [  OK  ]
> > Shutting down NFS services:  [  OK  ]
> > Shutting down RPC idmapd: [  OK  ]
> > Starting NFS services:  [  OK  ]
> > Starting NFS quotas: [  OK  ]
> > Starting NFS mountd: [  OK  ]
> > Starting NFS daemon: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No
> > such file or directory).
> > Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart
> > rpc.nfsd to correct the problem
> The question is why is /proc/fs/nfsd no longer getting mounted
> when he nfsd kernel module is loaded?
no, umount by test cases; 
> 
> Also I'm not able to reproduce this with nfs-utils-1.2.3-38
test in latest RTT distro RHEL6.5-20130913.0, it always reproduce.

Comment 5 RHEL Program Management 2013-10-14 02:01:47 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 6 Steve Whitehouse 2015-12-18 12:17:56 UTC
Why are the test cases umounting /proc/fs/nfsd ? This doesn't sound like something that would ever be encountered by a normal user. If that is the case then can we put the re-mounting of /proc/fs/nfsd into the test cases that have umounted it? That would solve the problem with out needing a change to RHEL itself.

Comment 7 JianHong Yin 2015-12-21 02:52:59 UTC
(In reply to Steve Whitehouse from comment #6)
> Why are the test cases umounting /proc/fs/nfsd ? This doesn't sound like
> something that would ever be encountered by a normal user. If that is the
> case then can we put the re-mounting of /proc/fs/nfsd into the test cases
> that have umounted it? That would solve the problem with out needing a
> change to RHEL itself.

Yes, maybe normal user will never encounter this scenario, but some users are not normal user..
 Add I just find that service nfs can auto mount the /proc/fs/nfsd in RHEL-7.
 So I think: if done that, will provide better "User Experience" :)

Comment 8 Steve Dickson 2016-01-11 22:43:33 UTC
(In reply to Yin.JianHong from comment #7)
> (In reply to Steve Whitehouse from comment #6)
> > Why are the test cases umounting /proc/fs/nfsd ? This doesn't sound like
> > something that would ever be encountered by a normal user. If that is the
> > case then can we put the re-mounting of /proc/fs/nfsd into the test cases
> > that have umounted it? That would solve the problem with out needing a
> > change to RHEL itself.
> 
> Yes, maybe normal user will never encounter this scenario, but some users
> are not normal user..
>  Add I just find that service nfs can auto mount the /proc/fs/nfsd in RHEL-7.
>  So I think: if done that, will provide better "User Experience" :)
While I agree with trying to provide a better User Experience,
testing unsupported configuration or actions, like unmounting 
/proc/fs/nfsd, I don't think is a good place to spend our time.

We got enough real, customer driven, bugs to fix and test 
so spend time on "what if" bugs like this is probably 
not the right thing to do.... IMHO...

Comment 9 JianHong Yin 2016-01-12 02:46:22 UTC
(In reply to Steve Dickson from comment #8)
> (In reply to Yin.JianHong from comment #7)
> > (In reply to Steve Whitehouse from comment #6)
> > > Why are the test cases umounting /proc/fs/nfsd ? This doesn't sound like
> > > something that would ever be encountered by a normal user. If that is the
> > > case then can we put the re-mounting of /proc/fs/nfsd into the test cases
> > > that have umounted it? That would solve the problem with out needing a
> > > change to RHEL itself.
> > 
> > Yes, maybe normal user will never encounter this scenario, but some users
> > are not normal user..
> >  Add I just find that service nfs can auto mount the /proc/fs/nfsd in RHEL-7.
> >  So I think: if done that, will provide better "User Experience" :)
> While I agree with trying to provide a better User Experience,
> testing unsupported configuration or actions, like unmounting 
> /proc/fs/nfsd, I don't think is a good place to spend our time.
> 
> We got enough real, customer driven, bugs to fix and test 
Yes, I noticed that.
> so spend time on "what if" bugs like this is probably 
> not the right thing to do.... IMHO...
Understanding.