Bug 953712 - rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not running
Summary: rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Launch Scripts
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: RHQ 4.7
Assignee: John Sanda
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 951619
TreeView+ depends on / blocked
 
Reported: 2013-04-19 02:30 UTC by John Sanda
Modified: 2013-09-03 16:33 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-03 16:33:01 UTC
Embargoed:


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

Description John Sanda 2013-04-19 02:30:50 UTC
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:
Always


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-19 02:35:53 UTC
Fixed pushed to master. 

commit hash: 69bf1f9b71

Comment 2 Armine Hovsepyan 2013-04-25 15:08:48 UTC
verified.
thank you.

verification screenshot is attached.

Comment 3 Armine Hovsepyan 2013-04-25 15:09:14 UTC
Created attachment 739955 [details]
agent_wrapper_exitValue


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