Bug 1596138

Summary: [rpc.nfsd] Setting version failed: errno 22 (Invalid argument) since 1.3.0-0.55.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: urgent Docs Contact:
Priority: urgent    
Version: 7.6CC: ajmitchell, bfields, dzheng, haizhao, jiyin, junli, kraxel, salmy, smayhew, steved, swhiteho, xifeng, xzhou, yieli
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.59.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1614603 (view as bug list) Environment:
Last Closed: 2018-10-30 11:48:04 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:
Bug Depends On: 1614603    
Bug Blocks:    

Description Yongcheng Yang 2018-06-28 09:58:50 UTC
Description of problem:
Looks like there's a problem introduced by Bug 1436977 (https://bugzilla.redhat.com/show_bug.cgi?id=1436977).
It emits warning when using the rpc.nfsd options -N or -V now, i.e.
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)

Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.55.el7
(It's good in 1.3.0-0.54.el7)

How reproducible:
always

Steps to Reproduce:
Using rpc.nfsd -N or --no-nfs-version vers
and
Using rpc.nfsd -V or --nfs-version vers

Actual results:
[root@ibm-x3650m4-08 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.55.el7.x86_64
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0 && rpc.nfsd -N 3
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0 && rpc.nfsd -N 4
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0 && rpc.nfsd -V 4
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[root@ibm-x3650m4-08 ~]# echo $?
0
[root@ibm-x3650m4-08 ~]# 


Expected results:
*No warning*
[root@ibm-x3550m4-02 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.54.el7.x86_64
[root@ibm-x3550m4-02 ~]# rpc.nfsd 0 && rpc.nfsd -N 3
[root@ibm-x3550m4-02 ~]# rpc.nfsd 0 && rpc.nfsd -V 4
[root@ibm-x3550m4-02 ~]#

Comment 2 Yongcheng Yang 2018-06-28 11:05:32 UTC
Turns out this warning can be easily reproduced without any argument:
~~~~~~~~~~~~~~~~~~~~~~~~
[root@ibm-x3650m4-08 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.55.el7.x86_64
                 ^^^^
[root@ibm-x3650m4-08 ~]# >/etc/sysconfig/nfs
[root@ibm-x3650m4-08 ~]# >/etc/nfs.conf
[root@ibm-x3650m4-08 ~]# systemctl start nfs && systemctl stop nfs
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0
[root@ibm-x3650m4-08 ~]# rpc.nfsd
rpc.nfsd: Setting version failed: errno 22 (Invalid argument) <<<<<<<<
[root@ibm-x3650m4-08 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
[root@ibm-x3650m4-08 ~]# 

What's more, rpc.nfsd -N 3/4 or -V 3/4 won't work as expected:
~~~~~~~~~~~~~~~~~~~~~~~~
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0 && rpc.nfsd -N 3
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[root@ibm-x3650m4-08 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp   2049  nfs   <<<<<<<<<<<<
    100003    4   tcp   2049  nfs
    100003    3   udp   2049  nfs   <<<<<<<<<<<<
    100003    4   udp   2049  nfs
[root@ibm-x3650m4-08 ~]# rpc.nfsd 0 && rpc.nfsd -N 4
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[root@ibm-x3650m4-08 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs   <<<<<<<<<<<<
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs   <<<<<<<<<<<<
[root@ibm-x3650m4-08 ~]# 

Compared with previous actions:
~~~~~~~~~~~~~~~~~~~~~~~~
[root@ibm-x3550m4-02 ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.54.el7.x86_64
                 ^^^^
[root@ibm-x3550m4-02 ~]# rpc.nfsd 0 && rpc.nfsd -N 3
[root@ibm-x3550m4-02 ~]# rpcinfo -p | grep -w nfs
    100003    4   tcp   2049  nfs
    100003    4   udp   2049  nfs
[root@ibm-x3550m4-02 ~]# rpc.nfsd 0 && rpc.nfsd -N 4
[root@ibm-x3550m4-02 ~]# rpcinfo -p | grep -w nfs
    100003    3   tcp   2049  nfs
    100003    3   udp   2049  nfs
[root@ibm-x3550m4-02 ~]#

Comment 15 Zhi Li 2018-08-08 09:31:17 UTC
This issue also influences /etc/nfs.conf, my test result is listed as follow:

rhel-7.6
~~~~
[root@ ~]# uname -r
3.10.0-931.el7.x86_64
[root@ ~]# systemctl restart nfs
[root@ ~]# cat /proc/fs/nfsd/versions 
+2 +3 +4 +4.1 +4.2
[root@ ~]# cat >> /etc/nfs.conf 
[nfsd]
vers2=n
vers3=n
[root@ ~]# systemctl restart nfs
[root@hp-dl380pg8-10 ~]# cat /proc/fs/nfsd/versions 
+2 +3 +4 +4.1 +4.2

rhel-7.5
~~~~
[root@ ~]# uname -r
3.10.0-862.el7.x86_64
[root@ ~]# systemctl restart nfs
[root@ ~]# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2
[root@ ~]# cat >> /etc/nfs.conf 
[nfsd]
vers2=n
vers3=n
[root@ ~]# systemctl restart nfs
[root@hp-dl388g8-20 ~]# cat /proc/fs/nfsd/versions 
-2 -3 +4 +4.1 +4.2

Comment 18 Yongcheng Yang 2018-08-10 02:10:19 UTC
*** Bug 1614464 has been marked as a duplicate of this bug. ***

Comment 21 Yongcheng Yang 2018-08-14 11:57:10 UTC
*** Bug 1615801 has been marked as a duplicate of this bug. ***

Comment 22 Yongcheng Yang 2018-09-28 10:17:43 UTC
(As Bug 1614603 Comment #15 says) Have verified in nfs-utils-1.3.0-0.60.el7:
--------------------------------------------------
[10:28:49 root@ ~~]# rpc.nfsd
[10:28:49 root@ ~~]# rpcinfo -p | grep -w nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs

Compared with the previous nfs-utils-1.3.0-0.57.el7:
--------------------------------------------------
[23:22:30 root@ ~~]# rpc.nfsd
rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
[23:22:30 root@ ~~]# rpcinfo -p | grep -w nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs


Moving to VERIFIED now. Thanks for the help!

Comment 24 errata-xmlrpc 2018-10-30 11:48:04 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-2018:3311