RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 869400 - NFSv4 referrals fail if NFS server returns hostnames rather than IP addresses (nfs-utils part)
Summary: NFSv4 referrals fail if NFS server returns hostnames rather than IP addresses...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Rock Lee
URL:
Whiteboard:
Depends On:
Blocks: 873816
TreeView+ depends on / blocked
 
Reported: 2012-10-23 19:23 UTC by Chuck Lever
Modified: 2013-03-04 00:32 UTC (History)
3 users (show)

Fixed In Version: nfs-utils-1.2.3-33.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 873816 (view as bug list)
Environment:
Last Closed: 2013-02-21 10:55:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0468 0 normal SHIPPED_LIVE nfs-utils bug fix update 2013-02-20 21:07:08 UTC

Description Chuck Lever 2012-10-23 19:23:24 UTC
Description of problem:
NFS client in EL6 cannot follow NFSv4 referrals that contain hostnames rather than IP addresses.  "cd" into a referred-to directory fails, usually with Permission Denied.

Version-Release number of selected component (if applicable):
nfs-utils-1.2.3-26.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Set up an NFSv4 referral on an NFSv4 server specifying a hostname and export path
2. Mount the server and export containing the referral
3. On the client, cd into the NFS mount and then cd into the referred to directory
  
Actual results:
Permission denied or some other failure

Expected results:
The client should follow the referral, mount the referred to export, and allow the user to cd into that mounted export

Additional info:
One of two changes must be made.  Either:

 * 2.6.32.y kernel documentation supplies a simple script that must be installed under /usr/sbin/nfs_cache_getent, or

 * EL6 kernels must be built with CONFIG_NFS_USE_LEGACY_DNS=n, which should enable in-kernel DNS resolution

Comment 2 Chuck Lever 2012-10-24 15:06:42 UTC
Correction: the script is /sbin/nfs_cache_getent, not /usr/sbin/nfs_cache_getent.

Following an NFSv4 referral containing a hostname location FAILS on kernel 2.6.32-279.9.1.el6.x86_64, even with the /sbin/nfs_cache_getent script installed.  I confirmed the CONFIG_NFS_USE_LEGACY_DNS is set to "y" in this kernel's config.

Comment 3 Chuck Lever 2012-10-29 21:44:22 UTC
I used "git bisect" to find the point at which legacy DNS resolution starts failing.  It is this commit (just before 2.6.37):

commit c5b29f885afe890f953f7f23424045cdad31d3e4
Author: NeilBrown <neilb>
Date:   Thu Aug 12 16:55:22 2010 +1000

    sunrpc: use seconds since boot in expiry cache
    
    This protects us from confusion when the wallclock time changes.
    
    We convert to and from wallclock when  setting or reading expiry
    times.
    
    Also use seconds since boot for last_clost time.
    
    Signed-off-by: NeilBrown <neilb>
    Signed-off-by: J. Bruce Fields <bfields>

Neil has proposed a fix, which I've tested.  I will post a commit ID here when the fix is merged upstream.

Comment 4 Chuck Lever 2012-10-29 21:51:13 UTC
Let me recommend a way to test NFSv4 referral support.  For EL6:

  1.  Set up a Linux NFS server with NFSv4.0 support enabled

  2.  Create several "refer=" exports (see exports(5)) in an exported directory

     -  One refers to a working NFS export by hostname

     -  One refers to a working NFS export by hostname (which has IPv4 and IPv6 addresses)

     -  One refers to a working NFS export by a raw IPv4 address

     -  One refers to a working NFS export by a raw IPv6 address

     -  One refers to an export on an NFS server that is not available

  3.  Mount the exported directory via NFSv4.0 on the client under test

  4.  "cd" and "ls" commands should cause a successful submount in all but the final case

Comment 5 Chuck Lever 2012-11-05 22:17:20 UTC
As of v3.7-rc4, the Linus tree has a commit to address the regression.  The commit is 8d96b10639fb4023 "NFS: fix bug in legacy DNS resolver."

As a test, I've built and installed 2.6.32-279 with this fix applied, and NFSv4 referrals work as expected.

GregKH reports he has applied this fix to stable trees 3.6.y, 3.4.y, and 3.0.y.

Comment 7 Rock Lee 2012-12-11 08:51:49 UTC
Reproduced on VERSION nfs-utils-1.2.3-30.el6

Comment 10 errata-xmlrpc 2013-02-21 10:55:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0468.html


Note You need to log in before you can comment on or make changes to this bug.