Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1358021 - init script 'status' command returns wrong exit code
Summary: init script 'status' command returns wrong exit code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: sqlgrey
Version: el6
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 20:20 UTC by Alex Carmel
Modified: 2016-08-08 21:48 UTC (History)
3 users (show)

Fixed In Version: sqlgrey-1.7.6-4.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-08 21:48:11 UTC


Attachments (Terms of Use)

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.


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