Bug 808724 - systemctl restart nfs-server.service can't start nfs-server
systemctl restart nfs-server.service can't start nfs-server
Status: CLOSED DUPLICATE of bug 802770
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 808725
  Show dependency treegraph
 
Reported: 2012-03-31 06:47 EDT by WANG Chao
Modified: 2015-02-08 16:42 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 808725 (view as bug list)
Environment:
Last Closed: 2012-04-16 19:59:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description WANG Chao 2012-03-31 06:47:17 EDT
Description of problem:

As systemctl man page said:
restart [NAME...]
Restart one or more units specified on the command line. If the units are not running yet they will be started.

I try start the nfs-server with restart option which is the first time to attempt to start nfs after installation, but `systemctl restart nfs-server.service` fails, while `systemctl start nfs-server.service` is working fine.

/var/log/message:
Mar 30 09:09:22 intel-chiefriver-02 rpc.nfsd[1234]: rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Mar 30 09:09:22 intel-chiefriver-02 rpc.nfsd[1234]: Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
Mar 30 09:09:22 intel-chiefriver-02 rpc.nfsd[1234]: error starting threads: errno 38 (Function not implemented)
Mar 30 09:09:22 intel-chiefriver-02 systemd[1]: nfs-server.service: control process exited, code=exited status=1
Mar 30 09:09:22 intel-chiefriver-02 systemd[1]: Unit nfs-server.service entered failed state.

# systemctl status nfs-server.service
nfs-server.service - NFS Server
          Loaded: loaded (/lib/systemd/system/nfs-server.service; disabled)
          Active: failed since Sat, 31 Mar 2012 06:02:07 -0400; 2min 58s ago
         Process: 12071 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT} (code=exited, status=1/FAILURE)
         Process: 12070 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
         Process: 12068 ExecStartPre=/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS (code=exited, status=0/SUCCESS)
         Process: 12065 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/nfs-server.service


Version-Release number of selected component (if applicable):
nfs-utils-1.2.5-12.fc17.x86_64

How reproducible:
100%

Steps to Reproduce:
1.yum install -y nfs-utils
2.systemctl restart nfs-server.service
3.
  
Actual results:
Wont start the service.

Expected results:
Restart should work as start when the service is inactive.


Additional info:
Comment 1 Steve Dickson 2012-04-02 09:06:32 EDT
The problem is on restarts the /proc/fs/nfsd file system is not being mounted which does get mounted on starts.

Here is the Unit section:
[Unit]
Description=NFS Server
Requires=proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount rpcbind.service
After=network.target named.service rpcbind.service proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount

Which clearly states the nfs-server service requires the proc-fs-nfsd.mount service (which does the mount). It also clearly states the nfs-server service has to happen after the proc-fs-nfsd.mount service... 

So its not clear to me what more has to happen from the nfs-utils side...
Comment 2 WANG Chao 2012-04-04 22:34:59 EDT
(In reply to comment #1)
> Which clearly states the nfs-server service requires the proc-fs-nfsd.mount
> service (which does the mount). It also clearly states the nfs-server service
> has to happen after the proc-fs-nfsd.mount service... 
> 
> So its not clear to me what more has to happen from the nfs-utils side...

Yes, I've checked the unit file, and it looks just fine.
But this issue does happen all the time, and `restart` doesn't work like `start`.

What else can I do to debug this issue? If you need more infomation to confirm it's not an nfs-utils issue, plz let me know.
Comment 3 Steve Dickson 2012-04-05 07:20:13 EDT
I would say lets move this to a systemd bug and see what they say...
Comment 4 Michal Schmidt 2012-04-05 09:55:38 EDT
Yes, this is a systemd bug.
Looks like we need to add dependency jobs for JOB_RESTART in transaction_add_job_and_dependencies(), the same as "type == JOB_START" has.
Comment 5 Michal Schmidt 2012-04-16 19:59:21 EDT

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

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