Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1182692

Summary: disable sm-notify on 'systemctl start nfs-server' no longer works
Product: Red Hat Enterprise Linux 7 Reporter: David Vossel <dvossel>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: JianHong Yin <jiyin>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.1CC: dvossel, eguan, fdinitto, jiyin, jruemker, mnovacek, steved, tlavigne, yoyang, yozone
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.8.el7 Doc Type: Bug Fix
Doc Text:
Cause: The upstream systemd scripts were integrated into RHEL7.1 Consequence: HA NFS fails to work since it need complete control over when the NFS server notifies its clients via sm-notify Fix: Not to run the sm-notify service in HA environments Result: HA NFS cluster now work like they did in RHEL7.0
Story Points: ---
Clone Of:
: 1689051 (view as bug list) Environment:
Last Closed: 2015-03-05 13:12:10 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:
Bug Depends On:    
Bug Blocks: 1034262, 1091101, 1151180    

Description David Vossel 2015-01-15 18:17:05 UTC
Description of problem:

This breaks the HA-NFS use case.

Previously, in 7.0, sm-notify ran as a result of statd. We could disable statd from launching sm-notify by putting STATDARGS=--no-notify in /etc/sysconfig/nfs.

Now, in 7.1 sm-notify has its own systemd service file, rpc-statd-notify.service. The nfs-server service now requires that the notify service launches as it's own service after nfs-server launches.

you can see that here. 

# cat /usr/lib/systemd/system/nfs-server.service  | grep notify
Wants=rpc-statd-notify.service
Before= rpc-statd-notify.service

The HA NFS use-case must have complete control over when the sm-notify command executes. We can not have systemd controlling that service for us in any automated fashion as a result of nfs-server starting. Like i mentioned earlier, we achieved this control in 7.0 by using 'STATDARGS=--no-notify'. Now that sm-notify executes outside of statd, we have no control.

The reasoning for all of this is we have to delay sm-notify from executing until our exports and floating IP have initiated. These resources are controlled by the cluster, not systemd, so there is no way for systemd to delay sm-notify correctly. There has been a lot of work done to make the NFSv3 lock recovery work correctly in the HA NFS use case. All of that work hinges on the cluster having complete control over sm-notify, not systemd.

Version-Release number of selected component (if applicable):

How reproducible:
100%

Steps to Reproduce:
1. set STATDARGS=--no-notify in /etc/sysconfig/nfs
2. execute systemctl start nfs-server

Actual results:

In var/log/messages during systemctl start nfs-server

Jan 14 11:37:30 localhost systemd: Starting Notify NFS peers of a restart...
Jan 14 11:37:30 localhost sm-notify: sm-notify: Version 1.3.0 starting
Jan 14 11:37:30 localhost sm-notify: sm-notify: No hosts to notify; exiting
Jan 14 11:37:30 localhost systemd: Started Notify NFS peers of a restart.


Expected results:

we don't want to see sm-notify executing during systemctl start nfs-server

Additional info:

Comment 5 JianHong Yin 2015-01-24 10:56:15 UTC
Hi steved.

Verify test fail. start nfs, can still start up the sm-notify.
Please check the test step:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: -server-Test-bz1182692-disable-sm-notify-no-longer-works
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[04:56:19 root@ ~~]# : >/var/log/messages
:: [   PASS   ] :: Running ': >/var/log/messages' (Expected 0, got 0)
--------------------------------------------------------------------------------
[04:56:19 root@ ~~]# echo STATDARGS=--no-notify >>/etc/sysconfig/nfs
:: [   PASS   ] :: Running 'echo STATDARGS=--no-notify >>/etc/sysconfig/nfs' (Expected 0, got 0)
--------------------------------------------------------------------------------
[04:56:20 root@ ~~]# service_nfsconfig restart
Redirecting to /bin/systemctl restart  nfs-config.service
:: [   PASS   ] :: Running 'service_nfsconfig restart' (Expected 0, got 0)
--------------------------------------------------------------------------------
[04:56:20 root@ ~~]# service_nfs start
Redirecting to /bin/systemctl start  nfs.service
{Info} nfs rpcinfo:
    100005  3,2,1     tcp6,udp6,tcp,udp                mountd      superuser
    100003  4,3       udp6,tcp6,udp,tcp                nfs         superuser
:: [   PASS   ] :: Running 'service_nfs start' (Expected 0, got 0)
--------------------------------------------------------------------------------
[04:57:23 root@ ~~]# grep "sm-notify.*starting" /var/log/messages
Jan 24 04:57:20 intel-mahobay-02 sm-notify[12663]: Version 1.3.0 starting
:: [   FAIL   ] :: Running 'grep "sm-notify.*starting" /var/log/messages' (Expected 1, got 0)
--------------------------------------------------------------------------------

[04:57:23 root@ ~~]# cat /var/log/messages
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting Preprocess NFS configuration...
Jan 24 04:56:20 intel-mahobay-02 systemd: Started Preprocess NFS configuration.
Jan 24 04:56:20 intel-mahobay-02 systemd: Mounting RPC Pipe File System...
Jan 24 04:56:20 intel-mahobay-02 systemd: Started Kernel Module supporting RPCSEC_GSS.
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting GSSAPI Proxy Daemon...
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting Network Manager Wait Online...
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting NFSv4 ID-name mapping service...
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting Host and Network Name Lookups.
Jan 24 04:56:20 intel-mahobay-02 systemd: Reached target Host and Network Name Lookups.
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting RPC Port Mapper.
Jan 24 04:56:20 intel-mahobay-02 systemd: Reached target RPC Port Mapper.
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting NFS status monitor for NFSv2/3 locking....
Jan 24 04:56:20 intel-mahobay-02 systemd: Mounting NFSD configuration filesystem...
Jan 24 04:56:20 intel-mahobay-02 rpc.statd[12141]: Version 1.3.0 starting
Jan 24 04:56:20 intel-mahobay-02 rpc.idmapd[12142]: main: open(/var/lib/nfs/rpc_pipefs//nfs): No such file or directory
Jan 24 04:56:20 intel-mahobay-02 rpc.statd[12141]: Flags: TI-RPC
Jan 24 04:56:20 intel-mahobay-02 systemd: Mounted RPC Pipe File System.
Jan 24 04:56:20 intel-mahobay-02 rpc.statd[12141]: Initializing NSM state
Jan 24 04:56:20 intel-mahobay-02 systemd: nfs-idmapd.service: control process exited, code=exited status=1
Jan 24 04:56:20 intel-mahobay-02 systemd: Failed to start NFSv4 ID-name mapping service.
Jan 24 04:56:20 intel-mahobay-02 systemd: Unit nfs-idmapd.service entered failed state.
Jan 24 04:56:20 intel-mahobay-02 systemd: Started Network Manager Wait Online.
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting Network is Online.
Jan 24 04:56:20 intel-mahobay-02 systemd: Reached target Network is Online.
Jan 24 04:56:20 intel-mahobay-02 kernel: Installing knfsd (copyright (C) 1996 okir.de).
Jan 24 04:56:20 intel-mahobay-02 systemd: Mounted NFSD configuration filesystem.
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting NFS Mount Daemon...
Jan 24 04:56:20 intel-mahobay-02 systemd: Starting RPC bind service...
Jan 24 04:56:20 intel-mahobay-02 rpcbind: Cannot open '/var/lib/rpcbind/rpcbind.xdr' file for reading, errno 2 (No such file or directory)
Jan 24 04:56:20 intel-mahobay-02 rpcbind: Cannot open '/var/lib/rpcbind/portmap.xdr' file for reading, errno 2 (No such file or directory)
Jan 24 04:56:20 intel-mahobay-02 systemd: Started RPC bind service.
Jan 24 04:56:20 intel-mahobay-02 systemd: Started GSSAPI Proxy Daemon.
Jan 24 04:56:20 intel-mahobay-02 systemd: Started RPC security service for NFS client and server.
Jan 24 04:56:20 intel-mahobay-02 systemd: Started RPC security service for NFS server.
Jan 24 04:56:20 intel-mahobay-02 rpc.mountd[12161]: Version 1.3.0 starting
Jan 24 04:56:20 intel-mahobay-02 systemd: Started NFS Mount Daemon.
Jan 24 04:56:54 intel-mahobay-02 logger: 2015-01-24 04:56:54 /usr/bin/rhts-test-runner.sh 1941 180 hearbeat...
Jan 24 04:57:20 intel-mahobay-02 systemd: Started NFS status monitor for NFSv2/3 locking..
Jan 24 04:57:20 intel-mahobay-02 systemd: Starting NFS server and services...
Jan 24 04:57:20 intel-mahobay-02 kernel: NFSD: starting 90-second grace period (net ffffffff819e0840)
Jan 24 04:57:20 intel-mahobay-02 systemd: Started NFS server and services.
Jan 24 04:57:20 intel-mahobay-02 systemd: Starting Notify NFS peers of a restart...
Jan 24 04:57:20 intel-mahobay-02 sm-notify[12663]: Version 1.3.0 starting
Jan 24 04:57:20 intel-mahobay-02 systemd: Started Notify NFS peers of a restart.
--------------------------------------------------------------------------------

Comment 16 Aneta Šteflová Petrová 2015-01-30 08:11:18 UTC
Steve, could you please provide a description for this bug? You can follow the preset template in the Doc Text field.

Comment 18 Steve Dickson 2015-02-05 16:26:25 UTC
(In reply to Aneta Petrová from comment #16)
> Steve, could you please provide a description for this bug? You can follow
> the preset template in the Doc Text field.
Done!

Comment 20 errata-xmlrpc 2015-03-05 13:12:10 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-0508.html