Bug 824775

Summary: If script returns -1, operation fails without details.
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: OperationsAssignee: RHQ Project Maintainer <rhq-maint>
Status: NEW --- QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp, jshaughn
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 824773 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description bkramer 2012-05-24 04:54:49 EDT
Description of problem:
If some shell script returns something else than 0, RHQ operation only says "Exit code was '1', see operation results for details", but there are no op results. The RHQ UI should not fail with this generic message.

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

How reproducible:

Steps to Reproduce:
1.run the wsprovide.sh with no arguments.
Actual results:
The operation will fail but the output of the failure icon will show the following generic message:

java.lang.Exception: Exit code was '1', see operation results for details
at org.rhq.core.pc.operation.OperationInvocation.run(OperationInvocation.java:278)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

Expected results:
The operation should fail but the output of the failure icon should point to the proper cause of the failure. 

Additional info:
The same issue was raised for:

1. JBoss Admin console (EMBJOPR-344: https://issues.jboss.org/browse/EMBJOPR-344) 
2. JON (https://bugzilla.redhat.com/show_bug.cgi?id=824773)
Comment 1 Mike Foley 2012-05-29 10:41:17 EDT
per BZ Triage 5/29/2012 (ccrouch, loleary, asantos, mfoley, myarborough) moving these to JON 3.1.1 or later