Bug 1404617

Summary: mount.nfs fall back to version 3 when specifying "nfsvers=4" since nfs-utils-1.3.0-0.34.el7
Product: Red Hat Enterprise Linux 7 Reporter: Yongcheng Yang <yoyang>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.4CC: chunwang, eguan, jiyin
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.35.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:48:51 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:

Comment 2 JianHong Yin 2016-12-15 11:22:47 UTC
FYI:

upstream has fixed this problem:

'''
[root@ibm-p720-02-lp7 nfs-utils.up]# mount.nfs -o vers=4  localhost:/   /mnt/nfsmpx
mount.nfs: access denied by server while mounting localhost:/
[root@ibm-p720-02-lp7 nfs-utils.up]# ./utils/mount/mount.nfs -o vers=4  localhost:/  /mnt/nfsmpx
[root@ibm-p720-02-lp7 nfs-utils.up]# grep /mnt/nfsmpx  /proc/mounts 
localhost:/ /mnt/nfsmpx nfs4 rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=::1,local_lock=none,addr=::1 0 0
'''

Comment 3 JianHong Yin 2016-12-15 12:09:18 UTC
FYI:

and I did build nfs-utils from nfs-utils-1.3.0-0.34.el7.src.rpm
  If use ./configure --disable-gss && make
  the mount.nfs works fine

  but If use default ./configure , got a compile fail:

'''
gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2 -MT nfsidmap.o -MD -MP -MF .deps/nfsidmap.Tpo -c -o nfsidmap.o nfsidmap.c
nfsidmap.c:39:21: error: static declaration of 'find_key_by_type_and_desc' follows non-static declaration
 static key_serial_t find_key_by_type_and_desc(const char *type,
                     ^
In file included from nfsidmap.c:11:0:
/usr/include/keyutils.h:167:21: note: previous declaration of 'find_key_by_type_and_desc' was here
 extern key_serial_t find_key_by_type_and_desc(const char *type, const char *desc,
                     ^
nfsidmap.c: In function 'find_key_by_type_and_desc':
nfsidmap.c:40:34: warning: unused parameter 'destringid' [-Wunused-parameter]
   const char *desc, key_serial_t destringid)
                                  ^
make[2]: *** [nfsidmap.o] Error 1
make[2]: Leaving directory `/root/nfs-utils-1.3.0/utils/nfsidmap'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/nfs-utils-1.3.0/utils'
make: *** [all-recursive] Error 1
'''

Comment 4 Steve Dickson 2016-12-18 16:04:39 UTC
Needed upstream patches

commit d57c433481c7ee5fc50a186188f9c205d16746c1
Author: Kinglong Mee <kinglongmee>
Date:   Wed May 6 15:25:12 2015 -0400

    mount: Writes signal number to kernel as command line


commit bf5c78cc241a1455462f9f5e1e40b6c820d23bbd
Author: Kinglong Mee <kinglongmee>
Date:   Wed May 6 15:21:50 2015 -0400

    When mounting nfs with -ov4, -overs=4 or -onfsvers=4, fail as,

Comment 7 Yongcheng Yang 2017-04-27 02:23:18 UTC
Moving to VERIFIED according to the test logs in Comment 6.

Comment 8 errata-xmlrpc 2017-08-01 19:48:51 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