Bug 953712 - rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not running
rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not ...
Product: RHQ Project
Classification: Other
Component: Launch Scripts (Show other bugs)
Unspecified Unspecified
unspecified Severity low (vote)
: ---
: RHQ 4.7
Assigned To: John Sanda
Mike Foley
Depends On:
Blocks: 951619
  Show dependency treegraph
Reported: 2013-04-18 22:30 EDT by John Sanda
Modified: 2013-09-03 12:33 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-03 12:33:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
agent_wrapper_exitValue (164.16 KB, image/png)
2013-04-25 11:09 EDT, Armine Hovsepyan
no flags Details

  None (edit)
Description John Sanda 2013-04-18 22:30:50 EDT
Description of problem:
Executing "rhq-agent-wrapper.sh status" when the agent is not running returns a value 1. Non-zero exit values should only be used when there is some error condition. This can/does cause problems for other scripts that call rhq-agent-wrapper.sh. 

I stumbled onto this while working on the rhqctl script (being developed in the feature/cassandra-backend branch). It is currently causing an exception in the Java code that invokes the script due to the non-zero exit value.

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

How reproducible:

Steps to Reproduce:
1. Make sure your agent is not running
2. Execute "rhq-agent-wrapper.sh status"
3. Execute "echo $?" and you will see a 1 printed to the terminal.
Actual results:

Expected results:

Additional info:
Comment 1 John Sanda 2013-04-18 22:35:53 EDT
Fixed pushed to master. 

commit hash: 69bf1f9b71
Comment 2 Armine Hovsepyan 2013-04-25 11:08:48 EDT
thank you.

verification screenshot is attached.
Comment 3 Armine Hovsepyan 2013-04-25 11:09:14 EDT
Created attachment 739955 [details]

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