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 1447849 - mount.nfs4 falls back to version 3 when mounting the exports with fsid=0 option
Summary: mount.nfs4 falls back to version 3 when mounting the exports with fsid=0 option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.4
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1456511 1457921
TreeView+ depends on / blocked
 
Reported: 2017-05-04 03:49 UTC by Yongcheng Yang
Modified: 2017-08-01 19:50 UTC (History)
5 users (show)

Fixed In Version: nfs-utils-1.3.0-0.44.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1457921 (view as bug list)
Environment:
Last Closed: 2017-08-01 19:50:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2233 0 normal SHIPPED_LIVE nfs-utils bug fix and enhancement update 2017-08-01 18:19:33 UTC

Description Yongcheng Yang 2017-05-04 03:49:55 UTC
Description of problem:

For the NFS exports identified with the fsid=0 option which means it's the root of all exported filesystem, previously (rhel-7.3) we can only mount it with command "mount -t nfs4 server:/ /mnt/home", while command "mount -t nfs4 server:/home /mnt/home" gets failed.  The difference being "server:/home" and "server:/".

But now with the latest nfs-utils, command "mount -t nfs4 server:/home /mnt/home" successes and it actually mounts with NFS version 3.


Version-Release number of selected component (if applicable):
Start from nfs-utils-1.3.0-0.35.el7 until latest version (1.3.0-0.41.el7)
(Haven't test version 1.3.0-0.34.el7 as cannot download it for now)

How reproducible:
100% easily

Steps to Reproduce:
1. echo "/home *(rw,fsid=0,sync)" > /etc/exports
                    ^^^^^^
2. systemctl restart nfs
3. mount -t nfs4 127.0.0.1:/home /mnt/test
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ should be failed

Actual results:
[root@hp-dl360g9-14 ~]# cat /etc/exports
/home *(rw,fsid=0,sync)
[root@hp-dl360g9-14 ~]# systemctl restart nfs
[root@hp-dl360g9-14 ~]# exportfs -v
/home         	<world>(rw,sync,wdelay,hide,no_subtree_check,fsid=0,sec=sys,secure,root_squash,no_all_squash)
[root@hp-dl360g9-14 ~]# mount -o vers=4 127.0.0.1:/home/ /mnt/mnt_test/
[root@hp-dl360g9-14 ~]# echo $?
0
[root@hp-dl360g9-14 ~]# nfsstat -m
/mnt/mnt_test from 127.0.0.1:/home/
 Flags:	rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=127.0.0.1,mountvers=3,mountport=20048,mountproto=udp,local_lock=none,addr=127.0.0.1

[root@hp-dl360g9-14 ~]# umount /mnt/mnt_test/
[root@hp-dl360g9-14 ~]# mount -t nfs4 127.0.0.1:/home/ /mnt/mnt_test/ -vvv
mount.nfs4: timeout set for Wed May  3 22:54:56 2017
mount.nfs4: trying text-based options 'vers=4.1,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: trying text-based options 'addr=127.0.0.1'
mount.nfs4: prog 100003, trying vers=3, prot=6
mount.nfs4: trying 127.0.0.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs4: prog 100005, trying vers=3, prot=17
mount.nfs4: trying 127.0.0.1 prog 100005 vers 3 prot UDP port 20048
[root@hp-dl360g9-14 ~]# umount /mnt/mnt_test/
[root@hp-dl360g9-14 ~]#
[root@hp-dl360g9-14 ~]# mount -o vers=4 127.0.0.1:/home/ /mnt/mnt_test/ -vvv
mount.nfs: timeout set for Wed May  3 22:58:06 2017
mount.nfs: trying text-based options 'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): No such file or directory
mount.nfs: trying text-based options 'addr=127.0.0.1'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 127.0.0.1 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 127.0.0.1 prog 100005 vers 3 prot UDP port 20048
[root@hp-dl360g9-14 ~]# umount /mnt/mnt_test/
[root@hp-dl360g9-14 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.35.el7.x86_64
[root@hp-dl360g9-14 ~]# 


Expected results:
### downgrade nfs-utils to 1.3.0-0.33.el7 ###
[root@hp-dl360g9-14 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.33.el7.x86_64
[root@hp-dl360g9-14 ~]# exportfs -v
/home         	<world>(rw,wdelay,root_squash,no_subtree_check,fsid=0,sec=sys,rw,secure,root_squash,no_all_squash)
[root@hp-dl360g9-14 ~]# mount -t nfs4 127.0.0.1:/home/ /mnt/mnt_test/ -vvv
mount.nfs4: timeout set for Wed May  3 22:57:04 2017
mount.nfs4: trying text-based options 'addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: mounting 127.0.0.1:/home/ failed, reason given by server: No such file or directory
[root@hp-dl360g9-14 ~]# mount -o vers=4 127.0.0.1:/home/ /mnt/mnt_test/ -vvv
mount.nfs: timeout set for Wed May  3 22:57:24 2017
mount.nfs: trying text-based options 'vers=4,addr=127.0.0.1,clientaddr=127.0.0.1'
mount.nfs: mount(2): No such file or directory
mount.nfs: mounting 127.0.0.1:/home/ failed, reason given by server: No such file or directory
[root@hp-dl360g9-14 ~]# 


Additional info:
Maybe introduced by Bug 1375259 (same as Bug 1404617)

Comment 9 Yongcheng Yang 2017-06-05 02:30:51 UTC
Moving to VERIFIED according to test logs of Comment #8

Comment 10 errata-xmlrpc 2017-08-01 19:50:23 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.

https://access.redhat.com/errata/RHBA-2017:2233


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