Bug 431477

Summary: mounting gets stale fh when exporting filesystems without a fsid= option
Product: Red Hat Enterprise Linux 5 Reporter: Jeff Layton <jlayton>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.1CC: ahecox, coughlan, jmoyer, staubach, steved
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0408 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:15:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch -- only apply fsid related checks in nfsd_fh when fsidtype == 1
none
purposed RHEL5 patch none

Description Jeff Layton 2008-02-04 21:18:37 UTC
Export a filesystem like this from a rhel5 box with current nfs-utils (I'm using
-30.el5, not sure exactly when this was broken):

/export                 *(rw,nohide,insecure,no_root_squash)

...then try to mount from a client:

# mount server:/export /mnt/rhel5
mount: Stale NFS file handle

...what's happening is that the auth.unix.ip and nfsd.export upcalls are working
correctly, but the nfsd.fh upcall fails to match the export and tell the kernel
to which path the filehandle corresponds. So the kernel ends up returning a
stale FH error back to the client.

The problem is a bad check in nfsd_fh. Patch to fix this follows. Frank Filz
from IBM mentioned the same patch in bug 315401 (along with a few others). He
mentioned that he had posted it to the list, but I can't seem to find it. The
problem also seems to extend beyond exports with crossmnt set.

Comment 1 Jeff Layton 2008-02-04 21:18:37 UTC
Created attachment 293942 [details]
patch -- only apply fsid related checks in nfsd_fh when fsidtype == 1

Comment 2 Jeff Layton 2008-02-04 21:30:54 UTC
Looks like the regression was probably introduced in:

nfs-utils-1.0.9-secinfo-crossmnt.patch

Steve -- does the patch in comment #1 look OK?


Comment 4 Steve Dickson 2008-02-06 15:36:21 UTC
Created attachment 294114 [details]
purposed  RHEL5 patch

Comment 6 Steve Dickson 2008-02-06 17:43:12 UTC
fixed in nfs-utils-1.0.9-31.el5

Comment 10 errata-xmlrpc 2008-05-21 15:15:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0408.html