Bug 830896 - candlepin prints a non-helpful message to catalina.out when manifest is corrupt
Summary: candlepin prints a non-helpful message to catalina.out when manifest is corrupt
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: William Poteat
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 15:20 UTC by Chris Duryee
Modified: 2015-05-14 15:18 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-11-07 15:57:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Chris Duryee 2012-06-11 15:20:01 UTC
Description of problem:

If you attempt to upload something that's not a zip file to candlepin, you'll get this error:

Jun 11 10:18:32 [http-8443-2] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import5147580043996834060237220625044442
Jun 11 10:18:32 [http-8443-2] ERROR org.candlepin.sync.Importer - Exception caught importing archive
java.io.FileNotFoundException: /var/cache/candlepin/sync/import5147580043996834060237220625044442/consumer_export.zip (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:137)
        at org.candlepin.sync.Importer.loadExport(Importer.java:181)
        at org.candlepin.resource.OwnerResource.importData(OwnerResource.java:888)

It would be better if candlepin verified that the uploaded file was in fact a zip file, and then printed an error if the file was not parsable for whatever reason. Throwing a FileNotFoundException can lead a sysadmin down the wrong path, checking file permissions and such.

Comment 2 William Poteat 2012-11-29 16:38:07 UTC
commit 4cd379f15d3fc3421583f228e5d39250a07fd953

Comment 3 Bryan Kearney 2014-11-07 15:57:16 UTC
This is available in release 0.7.21 and later. If you are still having issues, pelase feel free to reopen this bug.


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