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 1625032 - [nfsd] fail to disable major NFS version 4 using "vers4=n" in /etc/nfs.conf since nfs-utils-1.3.0-0.59.el7
Summary: [nfsd] fail to disable major NFS version 4 using "vers4=n" in /etc/nfs.conf s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.6
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Alice Mitchell
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 1633329
TreeView+ depends on / blocked
 
Reported: 2018-09-04 03:06 UTC by Yongcheng Yang
Modified: 2018-10-30 11:48 UTC (History)
6 users (show)

Fixed In Version: nfs-utils-1.3.0-0.61.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1633329 (view as bug list)
Environment:
Last Closed: 2018-10-30 11:48:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Differentiate between printing 4.0 and 4 (1.07 KB, patch)
2018-09-14 14:28 UTC, Alice Mitchell
no flags Details | Diff
Supress 4.0 flag unless kernel supports it (1.43 KB, patch)
2018-09-14 17:28 UTC, Alice Mitchell
no flags Details | Diff
Patch the bug in the same style as upstream (1.36 KB, patch)
2018-09-20 21:56 UTC, Alice Mitchell
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3311 0 None None None 2018-10-30 11:48:19 UTC

Description Yongcheng Yang 2018-09-04 03:06:35 UTC
Description of problem:

Setting "vers4=n/off" (disabling the major NFS version 4) in nfs.conf doesn't work now.

Refer to rpc.nfsd(8), "vers3/vers4" in the [nfsd] section of the /etc/nfs.conf file is to enable or disable a major NFS version 3 or 4 (which are normally enabled by default).

However, just found the "vers4=n" doesn't work since nfs-utils-1.3.0-0.59.el7 recently.


Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.59.el7

How reproducible:
always

Steps to Reproduce:
1. echo -e "[nfsd]\n vers4=n" > /etc/nfs.conf
2. systemctl restart nfs
3. cat /proc/fs/nfsd/versions


Actual results:
[root ~]# cat /etc/nfs.conf
[nfsd]
 vers4=n
[root ~]# systemctl restart nfs
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.1 -4.2
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.54.el7.x86_64    <<<<   good in -54.el7
[root ~]# yum update -y nfs-utils-1.3.0-0.55.el7.x86_64.rpm >/dev/null
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.55.el7.x86_64    <<<<   good in -55.el7
[root ~]# systemctl restart nfs
[root ~]# echo $?
0
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.1 -4.2
[root ~]# yum update -y nfs-utils-1.3.0-0.57.el7.x86_64.rpm >/dev/null
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.57.el7.x86_64    <<<<   good in -57.el7
[root ~]# systemctl restart nfs
[root ~]# echo $?
0
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.1 -4.2
[root ~]# yum update -y nfs-utils-1.3.0-0.59.el7.x86_64.rpm >/dev/null
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.59.el7.x86_64
[root ~]# systemctl restart nfs
[root ~]# echo $?
0
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2
     ^^^^^^^^^^^^^^  <<<<<<  start getting failed since -59.el7
[root ~]# 
[root ~]# yum update -y nfs-utils >/dev/null
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.60.el7.x86_64
[root ~]# systemctl restart nfs
[root ~]# echo $?
0
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2
     ^^^^^^^^^^^^^^  <<<<<<  still fails in the latest -60.el7


Expected results:
"vers4=n/off" in nfs.conf works


Additional info:

Looks like the RHEL8 also has this problem (i.e. Bug 1591609). However, as this function can work in rhel7.5 and starts getting failed recently, I'm just adding "Regression" for now.

Sorry for didn't report this problem earlier. I thought the kernel fix Bug 1614603 might resolve this problem. But it turns out to be not related.

Comment 5 Alice Mitchell 2018-09-14 14:28:51 UTC
Created attachment 1483344 [details]
Differentiate between printing 4.0 and 4

Found a small bug in the changes between the listed versions, the code to print out the list of versions was factored out but had a slight flaw in that when it was meant to print +4.0 it would print +4

This path seems to fix the issue:
nfs.conf: [nfsd] vers4=n
Before: -2 +3 +4 +4.1 +4.2
After: -2 +3 -4 -4.1 -4.2

Comment 6 Alice Mitchell 2018-09-14 17:28:40 UTC
Created attachment 1483380 [details]
Supress 4.0 flag unless kernel supports it

This is a better fix, it now passes through both major and minor +/-4 flags, and does not try to set 4.0 on kernels less than 4.11.0 (copied from upstream head)

Comment 8 Alice Mitchell 2018-09-19 18:28:26 UTC
The upstream already has fixes that give the same results, just implemented differently. I can submit a patch that makes them the same, but it amounts to just code simplification and not adding any features.

Comment 9 Steve Dickson 2018-09-19 18:37:53 UTC
(In reply to Justin Mitchell from comment #8)
> The upstream already has fixes that give the same results, just implemented
> differently. I can submit a patch that makes them the same, but it amounts
> to just code simplification and not adding any features.

Yes, I would like to keep upstream and rhel nfs-utils as close as
possible because it will make it easier to back port things
down the line.... What would it take to make rhel7 look the the
current upstream?

Comment 10 Alice Mitchell 2018-09-20 21:56:49 UTC
Created attachment 1485327 [details]
Patch the bug in the same style as upstream

I was wrong that this had been solved upstream, it also suffered from this case, so new upstream patch sent and new patch here which uses the same method and so stays closer to upstream.

Comment 12 Steve Dickson 2018-09-26 16:44:27 UTC
commit d68be5d6ae5086d6b4ad84507d0d14011df40aa2 
Author: Justin Mitchell <jumitche>
Date:   Wed Sep 26 10:37:17 2018 -0400

    nfs.conf: fail to disable major NFS version 4 using "vers4=n" in /etc/nfs.conf

Comment 14 Bob Handlin 2018-09-27 12:28:01 UTC
blocker+ set. RE: regression.

Comment 16 Yongcheng Yang 2018-09-28 01:38:08 UTC
Have verified this problem is fixed by nfs-utils-1.3.0-0.61.el7 now:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.60.el7.x86_64
[root ~]# cat /etc/nfs.conf
[nfsd]
 vers4=off
[root ~]# systemctl restart nfs
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2
^^^^^^^^^^^^^^^^^^ <<<<<<<<<<<<<<<<<<<<<<<<< reproduced in -60.el7
[root ~]# 
[root ~]# rpm -U nfs-utils-1.3.0-0.61.el7.x86_64.rpm 
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.61.el7.x86_64
[root ~]# systemctl restart nfs
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 -4 -4.0 -4.1 -4.2
^^^^^^^^^^^^^^^^^^^^^^^^ <<<<<<<<<<<<<<<<<<< works now in -61.el7
[root ~]# echo "" > /etc/nfs.conf
[root ~]# systemctl restart nfs
[root ~]# cat /proc/fs/nfsd/versions 
-2 +3 +4 +4.1 +4.2
^^^^^^^^^^^^^^^^^^ <<<<<<<<<<<<<<<<<<<< check the default config
[root ~]# 

Moving to VERIFIED now. Thanks for it!

Comment 18 errata-xmlrpc 2018-10-30 11:48:14 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


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