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 1063087 - nfsd magically changes /proc/fs/nfsd/nfsv4gracetime
Summary: nfsd magically changes /proc/fs/nfsd/nfsv4gracetime
Keywords:
Status: CLOSED CURRENTRELEASE
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:19 UTC by Dennis Jacobfeuerborn
Modified: 2019-04-16 14:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-21 16:34:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dennis Jacobfeuerborn 2014-02-10 00:19:52 UTC
After some debugging of a nfs cluster setup i discovered that nfsd seems to mess secretly with the /proc/fs/nfsd/nfsv4gracetime value.

If the nfsv4leasetime is larger than nfsv4gracetime then after a few seconds the daemon seem to automatically set the gracetime to the value of the leasetime. It does this without printing a warning to the logs or informing the admin of the system. 

While the behaviour makes sense given the meaning of these variables the magic way nfsd handles this makes debugging of gracetime issues a nightmare.
This also effectively breaks the NFSD_V4_GRACE variable in /etc/sysconfig/nfs.

I see too solutions here:

1) Since nfsd insists on gracetime >= leasetime an attempt to set gracetime to anything lower than the leasetime should result in an immediate error. This way the constraints are enforced in a better way (the current approach is racy) and there is no magical behaviour anymore making the admins life easier.

2) If the above is not possible for some reason then nfsd should at least print an warning to the syslog that it adjusted the value. That way the admin at least knows what is going on and does not have to go on a quest t find out who/what keeps resetting the gracetime.

I noticed this on a CentOS 6.5 system.

Comment 3 J. Bruce Fields 2015-02-20 15:03:38 UTC
Yes, this was a stupid idea on my part, apologies, recently fixed.  Maybe we should backport the following.

commit bea57fe45ba2
Author: J. Bruce Fields <bfields>
Date:   Mon Sep 15 11:05:46 2014 -0400

    nfsd4: stop grace_time update at end of grace period
    
    The attempt to automatically set a new grace period time at the end of
    the grace period isn't really helpful.  We'll probably shut down and
    reboot before we actually make use of the new grace period time anyway.
    So may as well leave it up to the init system to get this right.
    
    This just confuses people when they see /proc/fs/nfsd/nfsv4gracetime
    change from what they set it to.
    
    Signed-off-by: J. Bruce Fields <bfields>

Comment 4 J. Bruce Fields 2015-02-20 15:05:58 UTC
That said, that's mainly a cosmetic change, the enforced grace period should still be what you asked for, so I'm a little concerned to hear you say "This also effectively breaks the NFSD_V4_GRACE variable in /etc/sysconfig/nfs."

Steved, does 6.5 have the logic that uses NFSD_V4_GRACE to set the nlm grace period too?

Comment 5 Steve Dickson 2015-03-05 18:49:30 UTC
(In reply to J. Bruce Fields from comment #4)
> That said, that's mainly a cosmetic change, the enforced grace period should
> still be what you asked for, so I'm a little concerned to hear you say "This
> also effectively breaks the NFSD_V4_GRACE variable in /etc/sysconfig/nfs."
> 
> Steved, does 6.5 have the logic that uses NFSD_V4_GRACE to set the nlm grace
> period too?
Yes it does... but it only sets nfsv4gracetime not nfsv4leasetime.
That was fixed in RHEL6.6 with the fix to bz1058354

Comment 6 Steve Dickson 2015-10-21 16:34:27 UTC
(In reply to Steve Dickson from comment #5)
> (In reply to J. Bruce Fields from comment #4)
> > That said, that's mainly a cosmetic change, the enforced grace period should
> > still be what you asked for, so I'm a little concerned to hear you say "This
> > also effectively breaks the NFSD_V4_GRACE variable in /etc/sysconfig/nfs."
> > 
> > Steved, does 6.5 have the logic that uses NFSD_V4_GRACE to set the nlm grace
> > period too?
> Yes it does... but it only sets nfsv4gracetime not nfsv4leasetime.
> That was fixed in RHEL6.6 with the fix to bz1058354

This seems to be fixed... closing the bz.

Comment 7 Tom Coughlan 2015-11-05 16:33:11 UTC
Removing from the 68FileAndStorageRPL.


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