Bug 749089

Summary: nfs server doesn't start by systemd
Product: [Fedora] Fedora Reporter: Sergey Arsenyev <arseniev>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 16CC: bfields, jlayton, orion, steved
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-14 07:23:25 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Sergey Arsenyev 2011-10-26 02:32:59 EDT
Description of problem:

 systemd with standart nfs-server.service doesn't start nsfd

Version-Release number of selected component (if applicable):
nfs-utils.i686                          1:1.2.5-4.fc17
systemd.i686                             37-2.fc17 

How reproducible:

systemctl start nfs-server.service

Steps to Reproduce:
Actual results:

# ps -A | grep nfs
 2687 ?        00:00:00 nfsiod
# systemctl status nfs-server.service
nfs-server.service - NFS Server
	  Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled)
	  Active: active (running) since Wed, 26 Oct 2011 10:18:39 +0400; 1min 1s ago
	 Process: 623 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
	 Process: 622 ExecStop=/usr/sbin/rpc.nfsd 0 (code=exited, status=0/SUCCESS)
	 Process: 637 ExecStartPost=/usr/lib/nfs-utils/scripts/nfs-server.postconfig (code=exited, status=0/SUCCESS)
	 Process: 635 ExecStartPost=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS (code=exited, status=0/SUCCESS)
	 Process: 634 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT} (code=exited, status=0/SUCCESS)
	 Process: 633 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
	 Process: 631 ExecStartPre=/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS (code=exited, status=0/SUCCESS)
	 Process: 629 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig (code=exited, status=0/SUCCESS)
	Main PID: 632 (rpc.rquotad)
	  CGroup: name=systemd:/system/nfs-server.service
		  ├ 632 /usr/sbin/rpc.rquotad
		  └ 636 /usr/sbin/rpc.mountd

Expected results:

# ps -A | grep nfs
 1595 ?        00:00:00 nfsd4
 1596 ?        00:00:00 nfsd4_callbacks
 1597 ?        00:00:00 nfsd
 2687 ?        00:00:00 nfsiod

Additional info:
 NFS start with small workaround with nfs-server.service:
-ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}
+ExecStart=/bin/sh -c '/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}'
Comment 1 Orion Poplawski 2011-11-08 13:49:07 EST
True of nfs-utils-1.2.5-1.fc16.i686 as well.  Seems like a big deal to me.
Comment 2 Steve Dickson 2011-11-08 15:35:31 EST
Please make sure the new /etc/sysconfig/nfs is being used. 
Check to see if there is a /etc/sysconfig/nfs.rpmnew. If so please
either replace the /etc/sysconfig/nfs with the .rpmew version
or make sure RPCNFSDCOUNT is uncommented (RPCNFSDCOUNT=8).
Comment 3 Orion Poplawski 2011-11-08 16:39:42 EST
Ah, sorry about that.  Using puppet to overwrite the /etc/sysconfig/nfs file.  Fixing that fixed it for me.
Comment 4 Sergey Arsenyev 2011-11-11 02:15:01 EST
Ok. Uncomenting RPCNFSDCOUNT work fine.