Bug 734881 - Failed to generate Drift Diff
Failed to generate Drift Diff
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: drift (Show other bugs)
4.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 707225
  Show dependency treegraph
 
Reported: 2011-08-31 14:19 EDT by Mike Foley
Modified: 2012-02-07 14:28 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:28:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
image of error (47.00 KB, image/png)
2011-08-31 14:19 EDT, Mike Foley
no flags Details
client-side error (47.16 KB, image/png)
2011-08-31 14:19 EDT, Mike Foley
no flags Details
server-side log (see the end of this file) (397.15 KB, application/octet-stream)
2011-08-31 14:20 EDT, Mike Foley
no flags Details

  None (edit)
Description Mike Foley 2011-08-31 14:19:12 EDT
Created attachment 520873 [details]
image of error

Description of problem:  Failed to generate Drift Diff


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


How reproducible:
100%


Steps to Reproduce:
1.  Drift, History, View Diff

  
Actual results:
error, see attached.  

Expected results:


Additional info:
Comment 1 Mike Foley 2011-08-31 14:19:37 EDT
Created attachment 520874 [details]
client-side error
Comment 2 Mike Foley 2011-08-31 14:20:09 EDT
Created attachment 520875 [details]
server-side log (see the end of this file)
Comment 3 John Sanda 2011-08-31 15:29:25 EDT
I am able to generate and view a diff without error. I need more details and steps to reproduce.
Comment 4 Mike Foley 2011-08-31 15:49:01 EDT
Steps to reproduce:
click on Inventory top-level menu
<mfoley_> click on Platforms on the right side under Resources
<mfoley_> click on my Linux box ... which is the only platform ... which is named foleymonsterbox1
<mfoley_> click on the Drift tab
<mfoley_> click on History
<mfoley_> there is only 1 item in Drift History ... click on it
<mfoley_> and then click View Diff
Comment 5 John Sanda 2011-08-31 22:49:47 EDT
After working on this with Mike, we discovered that this appears to be oracle specific. If generate drift on an empty file, the blob field in the rhq_drift_file table where the bits are stored is null. When you try to open and read an input stream from the blob with oracle, it results in the NPE originally reported. This however does not happen with postgresql. 

To work around this, we now check the file/content size before accessing the blob. If the size is zero, an empty string is returned. It also should be noted that before this fix, we were not storing the size, but we are now. There is a column for it in rhq_drift_file.

commit hash: b6125949237abceab2abd2fcee70f339f12c4fa6
Comment 6 Mike Foley 2011-09-02 10:47:36 EDT
verified RHQ 4.1 release candidate.
Comment 7 Mike Foley 2012-02-07 14:28:55 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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