Bug 782561 - better error message when import new manifest into org fails
Summary: better error message when import new manifest into org fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Devan Goodwin
QA Contact: Eric Sammons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-17 17:31 UTC by Tom McKay
Modified: 2015-05-14 14:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 13:04:06 UTC


Attachments (Terms of Use)
portion of catalina.out during upload of second manifest (136.72 KB, application/octet-stream)
2012-01-17 17:31 UTC, Tom McKay
no flags Details

Description Tom McKay 2012-01-17 17:31:21 UTC
Created attachment 555834 [details]
portion of catalina.out during upload of second manifest

Importing a new manifest into an organization that has already had one imported gives an error:

Candlepin::Owner: 400 Bad Request {
  "displayMessage" : "Bad data in export archive"
} (POST /candlepin/owners/org2/imports?force=true)

Comment 1 Tom McKay 2012-01-17 19:01:33 UTC
Working as expected; improve error message returned to indicate that the problem arose from trying to import a manifest from a different distributor.

Comment 2 Bryan Kearney 2012-01-17 19:20:09 UTC
I would assume we would like better error text to tell you what data was bad.

Comment 3 Devan Goodwin 2012-01-18 16:51:30 UTC
I have internationalized all of the messages going into this particular exception class, two are unlikely to ever appear, the third is the one reported above:

(dgoodwin@redhat {master} ~/src/candlepin/proxy) $ curl -k -u admin:admin -F upload=@/tmp/candlepin-export-50405/export.zip "https://redhat.local.rm-rf.ca:8443/candlepin/owners/bob/imports"
(dgoodwin@redhat {master} ~/src/candlepin/proxy) $ curl -k -u admin:admin -F upload=@/tmp/candlepin-export-57777/export.zip "https://redhat.local.rm-rf.ca:8443/candlepin/owners/bob/imports"
{
  "displayMessage" : "Owner has already imported from another distributor"
}%                                                            

Look ok?

For QE: to verify you need to make two manifests from different upstream distributors/consumers and try to import them into the same owner.

The easiest way to do this if you are using a devel candlepin install is the proxy/buildconf/scripts/gen-export.rb script, just run it twice and you'll get two different manifests for dummy products, from different consumers. Wipe your db, import one, then the other.

Comment 4 Tom McKay 2012-01-18 17:12:56 UTC
Message looks good to me.

Comment 5 Devan Goodwin 2012-01-20 17:39:52 UTC
Fixed in candlepin.git master: 91168aa9782c4f7d1f4000b5d7c55b246a75d97a

Will be in >= candlepin-0.5.12-1

Comment 6 Bryan Kearney 2012-07-17 13:04:06 UTC
Marking all community bugs modified or beyong as closed.


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