Bug 804139 - Bundle deploy error, fails SHA256 check
Bundle deploy error, fails SHA256 check
Product: RHQ Project
Classification: Other
Component: Provisioning (Show other bugs)
Unspecified Unspecified
urgent Severity medium (vote)
: ---
: JON 3.1.0
Assigned To: John Mazzitelli
Mike Foley
Depends On:
Blocks: jon310-sprint11/rhq44-sprint11
  Show dependency treegraph
Reported: 2012-03-16 11:48 EDT by Mike Foley
Modified: 2013-09-03 11:15 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-03 11:15:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
sample bundle (472 bytes, application/zip)
2012-03-16 11:49 EDT, Mike Foley
no flags Details
server log (209.85 KB, text/x-log)
2012-03-16 11:49 EDT, Mike Foley
no flags Details
screenshot of client (82.60 KB, image/png)
2012-03-16 11:50 EDT, Mike Foley
no flags Details

  None (edit)
Description Mike Foley 2012-03-16 11:48:29 EDT
Description of problem:  Bundle deploy error, fails SHA256 check

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

How reproducible:

Steps to Reproduce:
1. create group.  i created a group with 1 platform, my linux box
2. basic simple bundle deployment use-case...i am deploying to /home/mfoley/mybundledeploy2
3. deployment fails.  see screenshot.  see server log.  
Actual results:

Deployment failed: java.lang.Exception:Package version [PackageVersion[package=Package[name=a.txt,packageType=PackageType[id=10031,name=My Bundle 1297957137903,resourceType=Ant Bundle Handler]],version=1.0,architecture=Architecture: name=[noarch]]] failed SHA256 check. expected=[42144f3939c3ffbbf0bf8b1f12affb5c23a4c5bd41e0ff672d54a5754f062058], actual=[5e7995610bdefd0a9515a92e153f9587a7fdeca216a6c30cbaba0bd0080a698f]

Expected results:

successful deployment

Additional info:

attachments:  sample bundle, server log, screenshot of client
Comment 1 Mike Foley 2012-03-16 11:49:00 EDT
Created attachment 570638 [details]
sample bundle
Comment 2 Mike Foley 2012-03-16 11:49:37 EDT
Created attachment 570639 [details]
server log
Comment 3 Mike Foley 2012-03-16 11:50:06 EDT
Created attachment 570640 [details]
screenshot of client
Comment 4 Mike Foley 2012-03-16 11:51:01 EDT
1st error in server log

2012-03-16 11:42:49,926 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1, SQLState: 23000
2012-03-16 11:42:49,926 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00001: unique constraint (RHQ.RHQ_BUNDLE_DESTINATION_UNIQUE) violated

2012-03-16 11:42:49,927 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with
Comment 5 John Mazzitelli 2012-03-23 17:02:22 EDT
the bundle file is called "a.txt" whose content is "a=b".

but when the agent streams it down, the content of the file is "a=btyBlob"

I searched the codebase for "tyBlob" and here's what I find:

      *  Can be used as initial contents for a PackageVersion's PackageBits whenever a predictable non-null
      *  value is required. Use as an initial value for the PackageBits.blob.bits. The value will
      *  typically be replaced with the actual streamed content bits...<br>
      *  Note: This is a String and not a byte[] because gwt can't handle String.getBytes(). 
     public static final String EMPTY_BLOB = "EmptyBlob";

It seems that:


initializes the content - but if the file content is less than 9 chars, it doesn't clear out the rest!
Comment 6 John Mazzitelli 2012-03-23 17:04:30 EDT
this looks related to bug #611456
Comment 7 John Mazzitelli 2012-03-23 17:31:45 EDT
git commit to master: 0e44e44

please check this against Oracle DB as well as Postgres.

Once you see that this deploys properly, as a final check, DELETE the bundle. (that is, go to the main bundle list view in the GUI, select the test bundle and click the delete button). See that it deletes properly. Again, do this on both Postgres AND Oracle.
Comment 8 Sunil Kondkar 2012-05-15 05:54:31 EDT
Verified on Version: 3.1.0.BETA1 Build Number: 95ef567:68f5518

Uploaded and deployed the attached sample bundle successfully. Also verified that the bundle gets deleted successfully.
Verified on Postgres 8.3.8 and Oracle11G.
Comment 9 Heiko W. Rupp 2013-09-03 11:15:13 EDT
Bulk closing of old issues in VERIFIED state.

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