Bug 953712

Summary: rhq-agent-wrapper.sh status returns an exit value of 1 when the agent is not running
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Launch ScriptsAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.6CC: ahovsepy, hrupp
Target Milestone: ---   
Target Release: RHQ 4.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-03 16:33:01 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:
Bug Depends On:    
Bug Blocks: 951619    
Attachments:
Description Flags
agent_wrapper_exitValue none

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