Bug 521675

Summary: nfs init scripts return wrong exit codes
Product: [Fedora] Fedora Reporter: Yulia Kopkova <ykopkova>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dkovalsk, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nfs-utils-1.2.1-6.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-28 22:16:29 UTC Type: ---
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: 521669    

Description Yulia Kopkova 2009-09-07 16:10:11 UTC
Description of problem:
According to https://fedoraproject.org/wiki/FCNewInit/Initscripts:
"service $SERVICE status" should return exit code "2" if program is dead and
/var/lock/subsys/cups file exists and "force-reload" option should be available.  

SERVICE:
nfs
nfslock
rpcgssd
rpcidmapd
rpcsvcgssd
 
The reason of filling this is "InitScripts LSB compliance project"


Version-Release number of selected component (if applicable):
nfs-utils-1.2.0-10.fc12.x86_64

How reproducible:
Always

Steps to Reproduce:
1. service $SERVICE stop
   touch /var/lock/subsys/$SERVICE
   service $SERVICE status ; echo $?

2. service $SERVICE force-reload ; echo $?
  

Actual results:
1. $SERVICE is stopped
3

2. Usage: /etc/init.d/$SERVICE {start|stop|restart|condstart|condrestart|status|condstop}
3


Expected results:
1. $SERVICE dead but subsys locked
2 

2. service $SERVICE force-reload ; echo $?
Reloading $SERVICE:                                       [  OK  ]
0


Additional info:

Comment 1 Yulia Kopkova 2009-09-17 12:26:06 UTC
3. One more thing:

Init scripts should also return code "4" if restarting service under
nonprivileged user:

su testuserqa -c "service $SERVICE restart"; echo $?
now: 1 
expected: 4

Comment 2 Yulia Kopkova 2009-09-24 17:06:53 UTC
4. Init script should return usage and exit code "2" for unknown argument:

# service $SERVICE unknown ; echo $?
Usage: nfs {start|stop|status|restart|reload|condrestart|condstop}
2

Comment 3 Bug Zapper 2009-11-16 12:01:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Fedora Update System 2010-10-20 14:45:28 UTC
nfs-utils-1.2.1-6.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/nfs-utils-1.2.1-6.fc12

Comment 6 Fedora Update System 2010-10-21 05:58:45 UTC
nfs-utils-1.2.1-6.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update nfs-utils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/nfs-utils-1.2.1-6.fc12

Comment 7 Fedora Update System 2010-10-28 22:16:10 UTC
nfs-utils-1.2.1-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.