Bug 1191920
Summary: | [nfs service] "service nfs reload-or-try-restart (force-reload)" failed after "service nfs stop" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Yongcheng Yang <yoyang> |
Component: | systemd | Assignee: | Jan Synacek <jsynacek> |
Status: | CLOSED ERRATA | QA Contact: | Frantisek Sumsal <fsumsal> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | fsumsal, glamb, jaster, joerg.kastning, jsynacek, lnykryn, msekleta, nikolai.kondrashov, systemd-maint-list, systemd-maint, xzhou, yoyang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | systemd-219-58.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-30 11:32: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: | 1269194, 1365226, 1383699, 1393867, 1400961, 1420851, 1466365, 1472751, 1549617, 1551061 |
Description
Yongcheng Yang
2015-02-12 09:09:59 UTC
What it act on RHEL6: [root@hp-dl380pg8-09 nfs]# service nfs status rpc.svcgssd is stopped rpc.mountd (pid 8288) is running... nfsd (pid 8304 8303 8302 8301 8300 8299 8298 8297) is running... rpc.rquotad (pid 8283) is running... [root@hp-dl380pg8-09 nfs]# service nfs force-reload [root@hp-dl380pg8-09 nfs]# echo $? 0 [root@hp-dl380pg8-09 nfs]# uname -r 2.6.32-504.el6.x86_64 [root@hp-dl380pg8-09 nfs]# service nfs start [root@hp-dl380pg8-09 nfs]# service nfs force-reload [root@hp-dl380pg8-09 nfs]# echo $? 0 [root@hp-dl380pg8-09 nfs]# Please retest with update systemd scripts. (In reply to Steve Dickson from comment #3) > Please retest with update systemd scripts. Still can be reproduced with nfs-utils-1.3.0-0.13.el7.x86_64 kernel-3.10.0-295.el7.x86_64 (RHEL-7.2-20150720.0) [root@hp-dl385pg8-03 ~]# service nfs stop Redirecting to /bin/systemctl stop nfs.service [root@hp-dl385pg8-03 ~]# echo $? 0 [root@hp-dl385pg8-03 ~]# service nfs force-reload Redirecting to /bin/systemctl force-reload nfs.service Job for nfs-server.service invalid. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed [root@hp-dl385pg8-03 ~]# echo $? 1 [root@hp-dl385pg8-03 ~]# service nfs status -l Redirecting to /bin/systemctl status -l nfs.service ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled) Active: inactive (dead) since Thu 2015-07-30 13:41:14 CST; 2min 37s ago Process: 17234 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS) Process: 17231 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS) Process: 17229 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS) Process: 17157 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS) Process: 17155 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Main PID: 17157 (code=exited, status=0/SUCCESS) Jul 30 13:41:13 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Starting NFS server and services... Jul 30 13:41:13 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Started NFS server and services. Jul 30 13:41:14 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Stopping NFS server and services... Jul 30 13:41:14 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Stopped NFS server and services. Jul 30 13:43:07 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Stopped NFS server and services. Jul 30 13:43:12 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Unit nfs-server.service cannot be reloaded because it is inactive. Jul 30 13:43:34 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Stopped NFS server and services. Jul 30 13:43:39 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Unit nfs-server.service cannot be reloaded because it is inactive. [root@hp-dl385pg8-03 ~]# service nfs start Redirecting to /bin/systemctl start nfs.service [root@hp-dl385pg8-03 ~]# service nfs force-reload Redirecting to /bin/systemctl force-reload nfs.service [root@hp-dl385pg8-03 ~]# echo $? 0 [root@hp-dl385pg8-03 ~]# service nfs status -l Redirecting to /bin/systemctl status -l nfs.service ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled) Active: active (exited) since Thu 2015-07-30 13:43:59 CST; 8s ago Process: 17234 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS) Process: 17231 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS) Process: 17229 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS) Process: 17499 ExecReload=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Process: 17465 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS) Process: 17463 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Main PID: 17465 (code=exited, status=0/SUCCESS) Jul 30 13:43:59 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Starting NFS server and services... Jul 30 13:43:59 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Started NFS server and services. Jul 30 13:44:01 hp-dl385pg8-03.rhts.eng.nay.redhat.com systemd[1]: Reloaded NFS server and services. [root@hp-dl385pg8-03 ~]# (In reply to Yongcheng Yang from comment #4) > (In reply to Steve Dickson from comment #3) > > Please retest with update systemd scripts. > > Still can be reproduced with nfs-utils-1.3.0-0.13.el7.x86_64 > kernel-3.10.0-295.el7.x86_64 (RHEL-7.2-20150720.0) > > [root@hp-dl385pg8-03 ~]# service nfs stop > Redirecting to /bin/systemctl stop nfs.service > [root@hp-dl385pg8-03 ~]# echo $? > 0 > [root@hp-dl385pg8-03 ~]# service nfs force-reload > Redirecting to /bin/systemctl force-reload nfs.service > Job for nfs-server.service invalid. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed It works just fine for me rhel7# /bin/systemctl force-reload nfs.service rhel7# /bin/systemctl force-reload nfs-server also, what exactly is this test testing? (In reply to Steve Dickson from comment #5) > (In reply to Yongcheng Yang from comment #4) > > (In reply to Steve Dickson from comment #3) > > > Please retest with update systemd scripts. > > > > Still can be reproduced with nfs-utils-1.3.0-0.13.el7.x86_64 > > kernel-3.10.0-295.el7.x86_64 (RHEL-7.2-20150720.0) > > > > [root@hp-dl385pg8-03 ~]# service nfs stop > > Redirecting to /bin/systemctl stop nfs.service > > [root@hp-dl385pg8-03 ~]# echo $? > > 0 > > [root@hp-dl385pg8-03 ~]# service nfs force-reload > > Redirecting to /bin/systemctl force-reload nfs.service > > Job for nfs-server.service invalid. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Failed > It works just fine for me > rhel7# /bin/systemctl force-reload nfs.service > rhel7# /bin/systemctl force-reload nfs-server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ please sop the nfs.service, and then test using the above "force-reload" command > > > also, what exactly is this test testing? Test the force-reload when the nfs.service is not running. And from man page of systemctl(1): reload-or-restart PATTERN... Reload one or more units if they support it. If not, restart them instead. If the units are not running yet, they will be started. (In reply to Yongcheng Yang from comment #6) > (In reply to Steve Dickson from comment #5) > > It works just fine for me > > rhel7# /bin/systemctl force-reload nfs.service > > rhel7# /bin/systemctl force-reload nfs-server > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > please sop the nfs.service, and then test using the above "force-reload" > command Ok I see the error: # systemctl stop nfs # systemctl force-reload nfs Job for nfs-server.service invalid. > > > > > > > also, what exactly is this test testing? > Test the force-reload when the nfs.service is not running. > > And from man page of systemctl(1): > reload-or-restart PATTERN... > Reload one or more units if they support it. > If not, restart them instead. If the units are > not running yet, they will be started. systemctl -l status nfs reports Unit nfs-server.service cannot be reloaded because it is inactive and when nfsd is loaded things work just fine # systemctl start nfs # systemctl force-reload nfs So I'm thinking that manpage is wrong when it talks about restarting the unit... Problem here is that the reload action is designed for the running daemons, it basically means that it should reload its configuration. nfs-server is not a daemon, it is oneshot service (with RemainAfterExit=yes) and to be honest I am quite surprised that reload action are allowed there at all. I will reassign this to systemd, we need to look what we should do in those cases. I believe this was discussed upstream and fixed in v229: https://github.com/systemd/systemd/issues/688 fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/209 -> post 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-2018:3245 *** Bug 1365226 has been marked as a duplicate of this bug. *** Dropping the stale needinfo. If our input is still needed, please set the needinfo again. |