This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 807524 - nfsd won't start under fc16 with systemd
nfsd won't start under fc16 with systemd
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
16
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 23:40 EDT by Ian Donaldson
Modified: 2012-03-28 08:06 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-28 08:06:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ian Donaldson 2012-03-27 23:40:55 EDT
Description of problem:

NFS server doesn't start as expected on FC16.

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

nfs-utils-1.2.5-5.fc16.x86_64


How reproducible:

100%



Steps to Reproduce:
1. systemctl enable nfs.service
   systemctl start nfs.service

2. ps -ef|grep nfsd        ... note isn't running
   netstat  -an |grep 2049 ... note nothing listening
   rpcinfo -p |grep nfs    ... note 'nfs' isn't registered
3.
  
Actual results:

mountd etc are running, but no nfsd.


Expected results:

nfsd running

Additional info:

The default /etc/sysconfig/nfs has RPCNFSDCOUNT commented out,
and /lib/systemd/system/nfs-server.service has this in it:

  ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}

which causes systemd to pass a NULL arg to rpc.nfsd by default, which
causes rpc.nfsd to silently exit without logging anything.  Probably
due to invalid arg detection.

By default, 

strace -e execve -f -p 1 &      shows this:  

[pid  8958] execve("/usr/sbin/rpc.nfsd", ["/usr/sbin/rpc.nfsd", ""], [/* 6 vars */]) = 0

Note the bogus "" arg.

Modifing the  systemd file to have this:

  ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT

fixes the problem.

Modifying /etc/sysconfig/nfs and uncommenting RPCNFSDCOUNT line also
fixes the problem.

Workaround: uncomment RPCNFSDCOUNT in /etc/sysconfig/nfs


Suggested fix... modify the ExecStart line and remove the {}; I've
tested this works with or without RPCNFSDCOUNT being commented in 
/etc/sysconfig/nfs.
Comment 1 Ian Donaldson 2012-03-27 23:50:44 EDT
Sorry, cancel this.  Seems my /etc/sysconfig/nfs wasn't the default
one; it was from an earlier fedora release which had RPCNFSDCOUNT commented.

The fc16 one doesn't have it commented, so there is no issue per se,
but perhaps the systemd config change I suggested should be done
as it allows for this case.

Also systemd probably should eliminate null args, or is that 
an intentional feature of {}  with it?
Comment 2 Steve Dickson 2012-03-28 08:06:57 EDT
(In reply to comment #1)
> Sorry, cancel this.  Seems my /etc/sysconfig/nfs wasn't the default
> one; it was from an earlier fedora release which had RPCNFSDCOUNT commented.
Unfortunately this have been a very common occurrence. In the 1.2.5-5 version I bumped up the default from one to eight nfsd processes, which should take care of this problem.

> 
> The fc16 one doesn't have it commented, so there is no issue per se,
> but perhaps the systemd config change I suggested should be done
> as it allows for this case.
> 
> Also systemd probably should eliminate null args, or is that 
> an intentional feature of {}  with it?
I have no idea... 

Sorry for the pain...

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