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 1688932 - sm-notify: add flag "-f" to nfs.conf parsing (RHEL7)
Summary: sm-notify: add flag "-f" to nfs.conf parsing (RHEL7)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nfs-utils
Version: 7.7
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On: 1677576 1716592
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-14 18:07 UTC by Steve Dickson
Modified: 2019-08-06 13:11 UTC (History)
6 users (show)

Fixed In Version: nfs-utils-1.3.0-0.63.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1677576
Environment:
Last Closed: 2019-08-06 13:11:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2268 0 None None None 2019-08-06 13:11:59 UTC

Description Steve Dickson 2019-03-14 18:07:24 UTC
+++ This bug was initially created as a clone of Bug #1677576 +++

Description of problem:
Fail to process the sm-notify option "-f" when converting /etc/sysconfig/nfs.
I.e.
[root]# cat /etc/sysconfig/nfs
SMNOTIFYARGS="-f"
[root]# nfsconvert
option -f not recognized
Error whilst converting SMNOTIFYARGS to nfsconf options.

Conversion failed. Please correct the error and try again.
[root]# man sm-notify | grep "\-f"
       -f     Send notifications even if sm-notify has already run since the last system reboot.
[root]# rpm -q nfs-utils
nfs-utils-2.3.3-13.el8.x86_64


Version-Release number of selected component (if applicable):
nfs-utils-2.3.3-13.el8

How reproducible:
always

Additional info:
Maybe this option is invalid and can be ignored now.
As I cannot find the corresponding param in /etc/nfs.conf:
~~~
[sm-notify]
# debug=0
# retry-time=900
# outgoing-port=
# outgoing-addr=
# lift-grace=y
~~~

(delay to 8.1 as this issue is trivial and it's too late for 8.0 now)

--- Additional comment from Steve Dickson on 2019-02-15 14:26:25 UTC ---

This is upstream problem since sm-notify does not look for
the force flag in nfs.conf.... Here is the proposed upstream
patch

https://marc.info/?l=linux-nfs&m=155023975505290&w=2

nfsconvert.py will have to be modified to deal with the flag
which look fairly easy...

--- Additional comment from Yongcheng Yang on 2019-02-18 04:31:02 UTC ---

(In reply to Steve Dickson from comment #1)
> This is upstream problem since sm-notify does not look for
> the force flag in nfs.conf.... Here is the proposed upstream
> patch
> 
> https://marc.info/?l=linux-nfs&m=155023975505290&w=2
> 
> nfsconvert.py will have to be modified to deal with the flag
> which look fairly easy...

Updating bug summary according to the above info. Thanks!

--- Additional comment from Steve Dickson on 2019-03-05 15:24:42 UTC ---

commit 3762a464a8cd7afa42e616194cc7fcd1d200c1ad
Author: Steve Dickson <steved>
Date:   Fri Mar 1 15:23:47 2019 -0500

    sm-notify: Added -f flag to nfs.conf parsing
    
    Cleaned up the nfs.conf parsing and added the setting
    of the force to the nfs.conf parsing
    
    Signed-off-by: Steve Dickson <steved>

--- Additional comment from Yongcheng Yang on 2019-03-08 09:50:01 UTC ---

Please note the patch of comment #3 has been merged in nfs-utils-2.3.3-15.el8 now.

(In reply to Steve Dickson from comment #1)
> ...
> nfsconvert.py will have to be modified to deal with the flag
> which look fairly easy...

However, the nfsconver script is still as previous and needs an update.
So I'm just removing the fixed version for now.


Testing logs:
~~~~~~~~~~~~~~~
[root.0 ~]# cat /etc/nfs.conf
[sm-notify]
# force=0
[root.0 ~]# >/var/log/messages && systemctl restart rpc-statd-notify
[root.0 ~]# grep notify /var/log/messages
Mar  8 04:43:11 8.1.0 sm-notify[38360]: Version 2.3.3 starting
Mar  8 04:43:11 8.1.0 sm-notify[38360]: Already notifying clients; Exiting! <--- by default
[root.0 ~]#
[root.0 ~]# vi /etc/nfs.conf
[root.0 ~]# cat /etc/nfs.conf
[sm-notify]
 force=1
[root.0 ~]# >/var/log/messages && systemctl restart rpc-statd-notify
[root.0 ~]# grep notify /var/log/messages
Mar  8 04:43:35 8.1.0 sm-notify[38378]: Version 2.3.3 starting  <--- No exit now
[root.0 ~]# >/var/log/messages && systemctl restart rpc-statd-notify
[root.0 ~]# grep notify /var/log/messages
Mar  8 04:43:42 8.1.0 sm-notify[38387]: Version 2.3.3 starting  <--- No exit now
[root.0 ~]# 
[root.0 ~]# >/etc/nfs.conf
[root.0 ~]# vi /etc/sysconfig/nfs
[root.0 ~]# cat /etc/sysconfig/nfs
SMNOTIFYARGS="-f"
[root.0 ~]# nfsconvert 
option -f not recognized
Error whilst converting SMNOTIFYARGS to nfsconf options.

Conversion failed. Please correct the error and try again.
~~~~~~~~~~~~~~~

--- Additional comment from Justin Mitchell on 2019-03-08 13:04 UTC ---

Comment 3 Yongcheng Yang 2019-03-15 01:14:24 UTC
I'm updating this summary a bit as the nfsconver script is only for rhel8.

Comment 5 Yongcheng Yang 2019-04-01 07:06:49 UTC
Have verified in nfs-utils-1.3.0-0.63.el7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://beaker.engineering.redhat.com/recipes/6687133#task90429735
------------------------------------------------------------------
[23:44:09 root@ ~~]# cat /etc/nfs.conf
[sm-notify]
 force = 1
[23:44:09 root@ ~~]# systemctl restart rpc-statd-notify
[23:44:09 root@ ~~]# grep "sm-notify.*Exiting" /var/log/messages
[23:44:09 root@ ~~]# sm-notify
[23:44:09 root@ ~~]# grep "sm-notify.*Exiting" /var/log/messages

Compared with previous version 61.el7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root ~]# rpm -q nfs-utils
nfs-utils-1.3.0-0.61.el7.x86_64
[root ~]# cat /etc/nfs.conf
[sm-notify]
 force=1
[root ~]# systemctl restart rpc-statd-notify
[root ~]# grep "sm-notify.*Exiting" /var/log/messages
Apr  1 03:04:12 rhel-7.6 sm-notify[1784]: Already notifying clients; Exiting!
[root ~]# sm-notify 
[root ~]# grep "sm-notify.*Exiting" /var/log/messages
Apr  1 03:04:12 rhel-7.6 sm-notify[1784]: Already notifying clients; Exiting!
Apr  1 03:04:23 rhel-7.6 sm-notify[1788]: Already notifying clients; Exiting!
[root ~]# 

Moving to VERIFIED now.

Comment 7 errata-xmlrpc 2019-08-06 13:11:50 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-2019:2268


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