Bug 824773

Summary: If script returns -1, operation fails without details.
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: OperationsAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: JON 3.0.1CC: hrupp, mazz, myarboro
Target Milestone: GA   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 824775 (view as bug list) Environment:
Last Closed: 2014-01-02 20:43:27 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:

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


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


How reproducible:
Always


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 JBoss Admin console (EMBJOPR-344: https://issues.jboss.org/browse/EMBJOPR-344)

Comment 1 Mike Foley 2012-05-29 14:41:34 UTC
per BZ Triage 5/29/2012 (ccrouch, loleary, asantos, mfoley, myarborough) moving these to JON 3.1.1 or later

Comment 2 Charles Crouch 2012-09-25 19:35:28 UTC
From EMBJOPR-344 the goal would be to display the output of stderr as part of the operation results.

Comment 3 Charles Crouch 2012-09-25 19:36:38 UTC
Setting priority to medium, since this is not a high impact issue.

Comment 4 Heiko W. Rupp 2013-09-13 14:56:21 UTC
Mazz,
can you please investigate the effort of a fix here?

Comment 5 John Mazzitelli 2013-09-13 18:21:27 UTC
i'm working on this. should be easy to fix

Comment 6 John Mazzitelli 2013-09-13 18:36:50 UTC
git master commit : 31ec51e 

we now show the results (as defined by the plugin metadata) in the UI, even if the operation failed. This is helpful in cases like this where the results contain data that might be helpful to the user to figure out why the failure occurred.