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 1463064 - mount tries v3 even though the Defaultvers=2 set in /etc/nfsmount.conf
Summary: mount tries v3 even though the Defaultvers=2 set in /etc/nfsmount.conf
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.9
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 03:33 UTC by Yongcheng Yang
Modified: 2017-12-06 12:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-06 12:03:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yongcheng Yang 2017-06-20 03:33:19 UTC
Description of problem:
If setting Defaultvers=2 in /etc/nfsmount.conf, the mount is actually trying v3 not v2

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

How reproducible:
100% easily

Steps to Reproduce:
1. Set "Defaultvers=2" in /etc/nfsmount.conf
2. Mount as default
3. Check the mounted nfs version


Actual results:
[root@ ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.9 (Santiago)
[root@ ~]# rpm -q nfs-utils
nfs-utils-1.2.3-75.el6.x86_64
[root@ ~]# grep ^[^#] /etc/nfsmount.conf
[ NFSMount_Global_Options ]
 Defaultvers=2
            ^^^
[root@ ~]# mount 127.0.0.1:/export_test /mnt -vvv
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: no type was given - I'll assume nfs because of the colon
mount: spec:  "127.0.0.1:/export_test"
mount: node:  "/mnt"
mount: types: "nfs"
mount: opts:  "(null)"
final mount options: '(null)'
mount: external mount: argv[0] = "/sbin/mount.nfs"
mount: external mount: argv[1] = "127.0.0.1:/export_test"
mount: external mount: argv[2] = "/mnt"
mount: external mount: argv[3] = "-v"
mount: external mount: argv[4] = "-o"
mount: external mount: argv[5] = "rw"
mount.nfs: timeout set for Mon Jun 19 23:15:21 2017
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 58089
127.0.0.1:/export_test on /mnt type nfs (rw)
[root@ ~]# nfsstat -m
/mnt from 127.0.0.1:/export_test
 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=58089,mountproto=udp,local_lock=none,addr=127.0.0.1

[root@ ~]# get_mp_nfsvers /mnt/
3
^^^
[root@ ~]# umount /mnt


Expected results:
Try mount v2 if setting "Defaultvers=2" in /etc/nfsmount.conf


### v2 specified mount works as expected ###
--------------------------------------------
[root@ ~]# mount 127.0.0.1:/export_test /mnt/ -o vers=2
[root@ ~]# get_mp_nfsvers /mnt/
2
[root@ ~]# umount /mnt/

### "Defaultvers=3" /etc/nfsmount.conf works as expected ###
------------------------------------------------------------
[root@ ~]# grep ^[^#] /etc/nfsmount.conf
[ NFSMount_Global_Options ]
 Defaultvers=3
[root@ ~]# mount 127.0.0.1:/export_test /mnt/
[root@ ~]# get_mp_nfsvers /mnt/
3
[root@ ~]# umount /mnt/

### "Defaultvers=4" /etc/nfsmount.conf works as expected ###
------------------------------------------------------------
[root@ ~]# grep ^[^#] /etc/nfsmount.conf
[ NFSMount_Global_Options ]
 Defaultvers=4
[root@ ~]# mount 127.0.0.1:/export_test /mnt/
[root@ ~]# get_mp_nfsvers /mnt/
4
[root@ ~]# umount /mnt/

Additional info:
It's maybe not a Severity issue as NFSv2 is not so popular IMHO.
Just file a bug to track it for now.

Comment 1 Jan Kurik 2017-12-06 12:03:33 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


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