Bug 1358021

Summary: init script 'status' command returns wrong exit code
Product: [Fedora] Fedora EPEL Reporter: Alex Carmel <alex.carmel>
Component: sqlgreyAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: alex.carmel, kevin, steve
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sqlgrey-1.7.6-4.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-08 21:48:11 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:

Description Alex Carmel 2016-07-19 20:20:56 UTC
Description of problem:
sqlgrey init script 'status' command returns wrong exit code. It doesn't play well with other scripts which are rely on exit codes. For example puppet can't restart sqlgrey if service is down. 

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


How reproducible:


Steps to Reproduce:
1. stop sqlgrey service
2. Run 'service sqlgrey status'


Actual results:
Exit code is '0'
sqlgrey is stopped
[alex@alex /home/alex]$ echo $?
0

Expected results:
Exit code shouldn't be 0 if service 

Additional info:

Proposal patch:

--- sqlgrey.orig        2016-07-19 20:14:18.071907619 +0000
+++ sqlgrey     2016-07-19 20:13:44.919988132 +0000
@@ -47,6 +47,7 @@

     status)
         status sqlgrey
+       RETVAL=$?
         ;;

     reload)

Comment 1 Fedora Update System 2016-07-23 21:20:18 UTC
sqlgrey-1.7.6-4.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-7b86273834

Comment 2 Fedora Update System 2016-07-25 03:48:06 UTC
sqlgrey-1.7.6-4.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-7b86273834

Comment 3 Fedora Update System 2016-08-08 21:48:08 UTC
sqlgrey-1.7.6-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.