Bug 1234598

Summary: Early grace period expiry with NFSv4.1
Product: Red Hat Enterprise Linux 7 Reporter: Chuck Lever <chuck.lever>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: bfields, eguan, fs-qe
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.12.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 04:29:54 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 Chuck Lever 2015-06-22 18:56:45 UTC
Description of problem:
The NFS server in upcoming RHEL kernels has the ability to expire the grace period early if there are only NFSv4.1 clients accessing its exports. However, matching support is needed in the nfsdcltrack program that is packaged with nfs-utils.

The support appears in nfs-utils starting around September 19, 2014. I think commit d479ad3adb06 is where it begins. An additional database column is introduced in the nfsdcltrack database to identify clients that have created a session during the server's previous boot instance.

Jeff Layton says:

> The has_session column would be automatically added when the updated
> nfsdcltrack is run for the first time. New kernel+old userspace (and
> vice-versa) should work, but you won't get the benefit of the grace
> period being lifted early.

> Steve, if you backport the nfs-utils patches for this, then I'll be
> happy to take a look if you want me to help review them.


Version-Release number of selected component (if applicable):
nfs-utils-1.3.0-0.8.el7.x86_64 is the latest RHEL 7 version I found.

Expected results:
After these changes are applied, the server should

a) recognize when there are only NFSv4.1 clients that have state to reclaim

b) expire the grace period after the last NFSv4.1 client has finished reclaiming state

c) behave the same (use a fixed 90-second grace period) in all other scenarios

Comment 2 Steve Dickson 2015-06-23 12:39:58 UTC
commit d479ad3adb0671c48d6fbf3e36bd52a31159c413
Author: Jeff Layton <jlayton>
Date:   Fri Sep 19 11:03:45 2014 -0400

    nfsdcltrack: update schema to v2

Comment 9 J. Bruce Fields 2015-08-06 20:26:29 UTC
I can reproduce upstream.  I think the NLM grace period is interfering here--this patch helps in the cases I'm testing:

http://marc.info/?l=linux-nfs&m=143889261918791

Comment 10 J. Bruce Fields 2015-08-07 16:13:50 UTC
Whoops, no, the problem is with my testcase, apologies.

It's sm-notify that's responsible for ending the NLM grace period early, and sm-notify is only run after a full reboot.  (Well, it runs when you restart nfs-server, but there's logic in it to exit immediately if it sees it's already run.)

So the best test is probably to do a full reboot of the server.  In the good cases the client's touch should hang during the reboot, but finish executing soon after nfsd comes back up.  In the bad cases, it should take about another 90 seconds after nfsd comes back up.

Comment 19 errata-xmlrpc 2015-11-19 04:29:54 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://rhn.redhat.com/errata/RHBA-2015-2196.html