Bug 947073

Summary: Enable NFS v4.1 server support
Product: [Fedora] Fedora Reporter: Anthony Messina <amessina>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: amessina, bfields, jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 865543 Environment:
Last Closed: 2013-04-11 10:07:27 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:

Description Anthony Messina 2013-04-01 14:12:30 UTC
+++ This bug was initially created as a clone of Bug #865543 +++

Description of problem:

Currently NFS v4.1 is off by default. To turn this support on,
rpc.nfsd has to be modified and recompiled. 

I propose we enable v4.1 by default and be able to disable
the support with the -N flag.

--- Additional comment from J. Bruce Fields on 2012-10-11 14:02:15 EDT ---

(In reply to comment #0)
> Currently NFS v4.1 is off by default. To turn this support on,
> rpc.nfsd has to be modified and recompiled. 

We also need to fix some protocol violations that we're just fortunate happen not to affect interoperability with the current Linux client.

For example, 4.1 clients are allowed to request whatever security flavor they wish on the backchannel.  However, the current security code ignores what the client requests and uses auth_sys on the backchannel--just because we happen to know that's what the current Linux client always asks for.

I have six of those todo's left, on this list:

  http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues#Highest_priority

> I propose we enable v4.1 by default and be able to disable
> the support with the -N flag.

I'll make a push to get through those list of issues for the 2.8 kernel, at which point we can backport the additional patches if necessary and change the default.

Any help there would be appreciated.

--- Additional comment from J. Bruce Fields on 2012-10-11 14:08:24 EDT ---

(In reply to comment #1)
> I'll make a push to get through those list of issues for the 2.8 kernel

(Sorry, 3.8!)

--- Additional comment from Anthony Messina on 2012-12-04 12:30:06 EST ---

In the meantime, would it be unreasonable to add something like the following to nfs-utils in Fedora?  I'm testing this out as a "fix" to the performance issues I've seen where the nfsv4.0 server cannot connect to the client for callbacks due to the firewall on the client:

kernel: [250695.159949] RPC: AUTH_GSS upcall timed out.
kernel: [250695.159949] Please check user daemon is running.

diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index d965dbe..d6f752e 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -7,4 +7,9 @@ if [ -n "$NFSD_V4_GRACE" ]; then
        echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
 fi
 
+# Enable v4.1 if requested
+if [ "$NFSD_V41_ENABLED" == "4.1" ]; then
+       echo "+4.1" > /proc/fs/nfsd/versions
+fi
+
 exit 0
diff --git a/nfs.sysconfig b/nfs.sysconfig
index 2d33cf3..3b01bb1 100644
--- a/nfs.sysconfig
+++ b/nfs.sysconfig
@@ -38,3 +38,6 @@ RPCSVCGSSDARGS=""
 #
 # Optional arguments passed to blkmapd. See blkmapd(8)
 BLKMAPDARGS=""
+#
+# Set to "4.1" to enable NFSv4.1 server.
+#NFSD_41_ENABLE="4.1"

If something like the above cannot be implemented the workaround is a little painful and needs to be done on each client:

1. Create /etc/modprobe.d/nfs.conf containing 'options nfs callback_tcpport=20490' (or any port of choice)

2. Open port 20490 on the client's firewall.

--- Additional comment from Anthony Messina on 2012-12-04 13:26:00 EST ---

Sorry for the spelling errors:

diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index d965dbe..d6f752e 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -7,4 +7,9 @@ if [ -n "$NFSD_V4_GRACE" ]; then
        echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
 fi
 
+# Enable v4.1 if requested
+if [ "$NFSD_V41_ENABLED" == "4.1" ]; then
+       echo "+4.1" > /proc/fs/nfsd/versions
+fi
+
 exit 0
diff --git a/nfs.sysconfig b/nfs.sysconfig
index 2d33cf3..1992457 100644
--- a/nfs.sysconfig
+++ b/nfs.sysconfig
@@ -38,3 +38,6 @@ RPCSVCGSSDARGS=""
 #
 # Optional arguments passed to blkmapd. See blkmapd(8)
 BLKMAPDARGS=""
+#
+# Set to "4.1" to enable NFSv4.1 server.
+#NFSD_V41_ENABLED="4.1"


Instead of the above, please apply the following patch to Fedora 18's nfs-utils package:
http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=e79badd

Comment 1 J. Bruce Fields 2013-04-01 15:34:40 UTC
Something like that patch would be fine, but actually steved just to an nfs-utils patch to add a --nfs-version option to rpc.nfsd that should accomplish the same thing (e79baddaa1d8cf24cce929e14f6f91ac0d5e15d0 "nfsd: Add support for the -V and --nfs-version optional arguments"), so I think that's what we'd want for people that want to test 4.1 in current Fedora.

Comment 2 Fedora Update System 2013-04-01 16:09:18 UTC
nfs-utils-1.2.7-6.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/nfs-utils-1.2.7-6.fc18

Comment 3 Anthony Messina 2013-04-01 16:42:15 UTC
(In reply to comment #2)
> nfs-utils-1.2.7-6.fc18 has been submitted as an update for Fedora 18.
> https://admin.fedoraproject.org/updates/nfs-utils-1.2.7-6.fc18

I confirm that the application of http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=e79badd and the above-named nfs-utils version fixes this issue in Fedora 18.  Thanks.

Comment 4 Fedora Update System 2013-04-11 10:07:28 UTC
nfs-utils-1.2.7-6.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.