Bug 812902

Summary: ContentSourceManagerBean fails to log exceptions that occur when streaming content to agent
Product: [Other] RHQ Project Reporter: John Sanda <jsanda>
Component: Core ServerAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-01 19:22:31 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 John Sanda 2012-04-16 14:13:36 UTC
Description of problem:
When content is streamed from server to agent, such as when deploying a new WAR or EAR file, if an exception occurs on the server, we re-throw the exception but fail to log it on the server. This can be problematic for diagnosing errors because the full stack trace may not be available on the agent depending on the exception thrown. I am referring specifically to the try/catch block in the outputPackageVersionBitsRangeHelper method. There are two catch blocks, one for SQLException and one for Exception. The exceptions are wrapped and re-thrown as RuntimeExceptions. We should be logging the exception before re-throwing.

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


How reproducible:
Only if an exception occurs while streaming content.


Steps to Reproduce:
Note that these are not actually steps to reproduce an exception, but steps that will cause the code in question to execute.

1. Import a Tomcat server along with a deployed WAR file into inventory.
2. Go to the resource details view for the WAR file and click on the Content tab.
3. Click on the New subtab.
4. Click the Upload New Package button, then the Upload File button.
5. Proceed through the upload dialog to upload a WAR file.
6. For repository, select None.
7. Click Continue and the Continue again to initiate the streaming to the agent.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2012-04-16 15:49:27 UTC
Logging changes have been added.

master commit hash: cf1dbb2c1d8606d249b5b88d7f5e7264d42820d0

Comment 2 Heiko W. Rupp 2013-09-01 19:22:31 UTC
Bulk closing of BZs that have no target version set, but which are ON_QA for more than a year and thus are in production for a long time.