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 1063088 - nfs init script does not take into account that nfsd modifies the grace time
Summary: nfs init script does not take into account that nfsd modifies the grace time
Keywords:
Status: CLOSED DUPLICATE of bug 1058354
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nfs-utils
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-10 00:31 UTC by Dennis Jacobfeuerborn
Modified: 2019-04-16 14:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-22 14:25:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dennis Jacobfeuerborn 2014-02-10 00:31:15 UTC
nfsd modifies the grace time for nfsv4 in magic ways:
https://bugzilla.redhat.com/show_bug.cgi?id=1063087

As a result of this the NFSD_V4_GRACE variable in /etc/sysconfig/nfs does not work as expected.
Since nfsd enforces that the grace time is always >= the lease time the lease time also needs to be changed together with the grace time in the init script. Since this does not happen at the moment the expected grace time will only be set for a few seconds after the nfs service is started and then reset by nfsd to the value of /proc/fs/nfsd/nfsv4leasetime.

So the following code from the init script:

        # Set v4 grace period if requested
        [ -n "$NFSD_V4_GRACE" ] && {
                echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
        }

needs to be changed to this:

        # Set v4 grace period if requested
        [ -n "$NFSD_V4_GRACE" ] && {
                echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4leasetime
                echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
        }

This is the easiest fix. A more correct one would probably remove the NFSD_V4_GRACE variable entirely and replace it with a NFSD_V4_LEASE variable and then derive the grace time from that (e.g. grace time = lease time + padding) sind the grace time should always be at least the same as the lease time but probably a bit larger (which is what nfsd now apparently enforces).

Comment 3 Steve Dickson 2015-02-20 14:46:16 UTC
(In reply to Dennis Jacobfeuerborn from comment #0)
> nfsd modifies the grace time for nfsv4 in magic ways:
> https://bugzilla.redhat.com/show_bug.cgi?id=1063087
> 
> As a result of this the NFSD_V4_GRACE variable in /etc/sysconfig/nfs does
> not work as expected.
> Since nfsd enforces that the grace time is always >= the lease time the
> lease time also needs to be changed together with the grace time in the init
> script. Since this does not happen at the moment the expected grace time
> will only be set for a few seconds after the nfs service is started and then
> reset by nfsd to the value of /proc/fs/nfsd/nfsv4leasetime.
> 
> So the following code from the init script:
> 
>         # Set v4 grace period if requested
>         [ -n "$NFSD_V4_GRACE" ] && {
>                 echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
>         }
> 
> needs to be changed to this:
> 
>         # Set v4 grace period if requested
>         [ -n "$NFSD_V4_GRACE" ] && {
>                 echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4leasetime
>                 echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
>         }
> 
Why not just set NFSD_V4_LEASE to the same value of NFSD_V4_GRACE?

Comment 4 Dennis Jacobfeuerborn 2015-02-20 16:50:59 UTC
NFSD_V4_LEASE doesn't seem to exists:

[root@nfs1a ~]# grep LEASE /etc/sysconfig/nfs 
[root@nfs1a ~]# grep LEASE /etc/init.d/nfs
[root@nfs1a ~]#

Comment 5 Steve Dickson 2015-04-22 14:25:31 UTC
(In reply to Dennis Jacobfeuerborn from comment #4)
> NFSD_V4_LEASE doesn't seem to exists:
> 
> [root@nfs1a ~]# grep LEASE /etc/sysconfig/nfs 
> [root@nfs1a ~]# grep LEASE /etc/init.d/nfs
> [root@nfs1a ~]#

It was added to the nfs-utils-1.2.3-48.el6 version:

rhel6$ grep LEASE /etc/sysconfig/nfs
# NFSD_V4_LEASE was on the previous boot.
# first make NFSD_V4_LEASE shorter, then restart server. 
#NFSD_V4_LEASE=90

rhel6$ grep LEASE /etc/init.d/nfs
	[ -n "$NFSD_V4_LEASE" ] && {
		echo "$NFSD_V4_LEASE" > /proc/fs/nfsd/nfsv4leasetime
rhel6$

see bug 1058354

*** This bug has been marked as a duplicate of bug 1058354 ***


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