Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 1093731

Summary: Client does not handle NFS4ERR_MOVED with NFSv4 referrals properly
Product: Red Hat Enterprise Linux 5 Reporter: Justin Parisi <parisi>
Component: kernelAssignee: nfs-maint
Status: CLOSED WONTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.10CC: bfields, nfs-maint, parisi, steved
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-09-12 19:57:58 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:
Attachments:
Description Flags
Working trace - RHEL 6.5
none
Non-working trace - RHEL 5.10 none

Description Justin Parisi 2014-05-02 13:38:48 UTC
Description of problem:

When attempting to mount a NFS export via NFSv4 using referrals, the mount attempt fails with the following error:

# mount -t nfs4 10.63.57.237:/unix /mnt
mount.nfs4: Object is remote

A packet trace of the failed mount shows that the NFS server returns the NFS4ERR_MOVED reply, but the client simply closes the connection (client - 10.228.225.145):

113         2.945802              10.228.225.145  10.63.57.237       NFS        274         V4 Call (Reply In 114) LOOKUP DH:0x19faf89b/unix
114         2.959779              10.63.57.237       10.228.225.145  NFS        130         V4 Reply (Call In 113) LOOKUP | GETFH Status: NFS4ERR_MOVED
115         2.960087              10.228.225.145  10.63.57.237       TCP        66           1015 > nfs [FIN, ACK] Seq=793 Ack=573 Win=6912 Len=0 TSval=49660910 TSecr=2495363212
117         2.960799              10.63.57.237       10.228.225.145  TCP        66           nfs > 1015 [ACK] Seq=573 Ack=794 Win=33536 Len=0 TSval=2495363212 TSecr=49660910

In a working NFSv4 referral (RHEL 6.5), the client sends a new LOOKUP call and asks the server for the FS_LOCATIONS attribute and receives the new NFS server location:

66           1.719265              10.228.225.140  10.63.57.237       NFS        250         V4 Call (Reply In 67) LOOKUP DH:0x19faf89b/unix
67           1.723071              10.63.57.237       10.228.225.140  NFS        130         V4 Reply (Call In 66) LOOKUP | GETFH Status: NFS4ERR_MOVED
68           1.723166              10.228.225.140  10.63.57.237       NFS        246         V4 Call (Reply In 69) LOOKUP DH:0x19faf89b/unix
Opcode: GETATTR (9)
recc_attr: FATTR4_FS_LOCATIONS (24)
69           1.729533              10.63.57.237       10.228.225.140  NFS        242         V4 Reply (Call In 68) LOOKUP
recc_attr: FATTR4_FS_LOCATIONS (24)
server: 10.63.3.68

And the referral uses that location:

98           1.797285              10.228.225.140  10.63.3.68            NFS        266         V4 Call (Reply In 99) LOOKUP DH:0x19faf89b/.refer-2147484674-0
99           1.799042              10.63.3.68            10.228.225.140  NFS        358         V4 Reply (Call In 98) LOOKUP
100         1.799117              10.228.225.140  10.63.3.68            NFS        242         V4 Call (Reply In 101) ACCESS FH:0xec488585, [Check: RD LU MD XT DL]
101         1.801092              10.63.3.68            10.228.225.140  NFS        322         V4 Reply (Call In 100) ACCESS, [Allowed: RD LU MD XT DL]
 
And the mount succeeds:
 
# mount 10.63.57.237:/unix /cdot
# mount | grep cdot
10.63.57.237:/unix on /cdot type nfs (rw,vers=4,addr=10.63.57.237,clientaddr=10.228.225.140)

It seems that the client does not handle the NFS4ERR_MOVED response properly and needs to issue a new LOOKUP call with the appropriate requested recc_attrs.


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

RHEL 5.10 
2.6.18-371.8.1.el5

How reproducible:

Easily reproduced


Steps to Reproduce:
1. Mount a NFS export that is not local to the IP address used in the mount call

Actual results:

Error "Object is remote"

Expected results:

Successful mount to referred IP address

Additional info:

Packet traces of working and non-working mounts attached.

Comment 1 Justin Parisi 2014-05-02 13:40:21 UTC
Created attachment 891820 [details]
Working trace - RHEL 6.5

Comment 2 Justin Parisi 2014-05-02 13:41:12 UTC
Created attachment 891821 [details]
Non-working trace - RHEL 5.10

Comment 3 Justin Parisi 2014-05-02 13:42:16 UTC
NFS utils version:

nfs-utils.x86_64                         1:1.0.9-70.el5                installed
nfs-utils-lib.x86_64                     1.0.8-7.9.el5                 installed
nfs-utils-lib.i386                       1.0.8-7.9.el5                 base     
nfs-utils-lib-devel.i386                 1.0.8-7.9.el5                 base     
nfs-utils-lib-devel.x86_64               1.0.8-7.9.el5                 base

Comment 4 J. Bruce Fields 2016-09-12 19:57:58 UTC
As far as I know this feature never worked in RHEL5.  We should encourage people who need referrals to upgrade their clients.

Reopen if there's really a big need for RHEL5 NFSv4 referral support.