Bug 627288

Summary: uploading bundle zip files that were packaged with certain tools cause exception
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: ProvisioningAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 4.0.0CC: mfoley
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 625146    

Description John Mazzitelli 2010-08-25 15:10:11 UTC
Description of problem:

Upload a bundle zip created with jar (or possibly some other utility or custom Java app) and you might get this:

java.lang.IllegalArgumentException: Negative initial size: -1

This was fixed in master, but never merged to a release branch. This is the master sha commit:

d7f47571f3e41951eb97fd07c5890c59a938d88a

I also just recently looked around and saw two other places where zip entries were assumed greater than 0. The commit is:

f52524eb36fa6863d5500e35971b7e86d268f009

That latter commit only affects file template bundles (so if you are using ant bundles, you are unaffected) and affects simple bundle size calculations which are not used anywhere important so everyone is going to be unaffected with that too. So the important fix is that d7f4757 one, unless you are using file template bundles, in which case that second one is probably needed as well.

Comment 1 John Mazzitelli 2010-12-13 18:32:34 UTC
this was fixed as per the description. We don't need it cherry picked to other branches right now. So closing this to ON_QA. I'm not sure how to test this since i'm not sure if I ever saw it myself. I guess one quick test would be to take a bundle zip file and re-compress it using some other tool (like "jar") and see if you can upload and deploy the bundle. The bundle doesn't have to be complicated. A single file in the bundle distro file is all that is needed.

Comment 2 Mike Foley 2011-04-25 15:42:09 UTC
tested interactively RHQ 4.0 as follows:  created a bundle with .jar and uploaded it no issues.  additionally uploaded and deleted other bundles.  also uploaded bundles from URL.

Comment 3 Corey Welton 2011-05-24 01:14:26 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 4 Corey Welton 2011-05-24 01:14:27 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 5 Corey Welton 2011-05-24 01:14:27 UTC
Bookkeeping - closing bug - fixed in recent release.