Bug 831426 - Users not able to import a subscription manifest
Users not able to import a subscription manifest
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Subscription Management (Show other bugs)
Unspecified Unspecified
urgent Severity urgent (vote)
: Unspecified
: --
Assigned To: Bryan Kearney
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-06-12 19:57 EDT by Mike McCune
Modified: 2014-01-27 08:26 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-06-15 10:24:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
python script to fix manifest format (1.97 KB, text/x-python)
2012-06-12 19:59 EDT, Mike McCune
no flags Details

  None (edit)
Description Mike McCune 2012-06-12 19:57:26 EDT
The latest format of the manifest zip files downloaded from the Customer Portal are no longer compatible with CFSE 1.0.0's version of Candlepin.

The error the user receives when trying to import ends up being found in tomcat's catalina.out:

Jun 11 20:42:21 [http-8443-1] INFO  org.candlepin.resource.OwnerResource - Importing archive: /var/cache/tomcat6/temp/pfx5505155024546797626sfx
Jun 11 20:42:21 [http-8443-1] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import24086964649270519618213240909525689
Jun 11 20:42:21 [http-8443-1] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import24086964649270519618213240909525689
Jun 11 20:42:23 [http-8443-1] ERROR org.candlepin.sync.Importer - Exception caught importing archive
org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: java.io.FileReader@5f75d92e; line: 1, column: 393]
	at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:159)

worked with Chris Duryee and James Bowes and determined a hotfix needs to be developed to have CFSE's candlepin properly deal with this new format.  This bug is filed to track that effort
Comment 1 Mike McCune 2012-06-12 19:59:41 EDT
Created attachment 591302 [details]
python script to fix manifest format
Comment 2 Mike McCune 2012-06-12 20:00:13 EDT
See the attached script for a short term fix to use to massage the manifest to get it to import.
Comment 3 Mike McCune 2012-06-12 20:03:04 EDT
To execute the above script copy the manifest zip file to the same directory as the script and run:

$ python ./cfse-1-0-0-manifest-fix.py ./manifest.zip
creating work directory
extracting manifest
reading entitlements
Fixing entitlement: 8a85f98637dcaca50137dd3a022a3d62.json
rebuilding manifest
cleaning up
all done. your new manifest is in manifest-fixed.zip

you then upload manifest-fixed.zip
Comment 4 James Bowes 2012-06-13 08:37:56 EDT
It's good to keep this bug open for the time being to help users find the attached script, but I plan on fixing this server side, in the manifest generation code.
Comment 6 James Bowes 2012-06-15 10:24:01 EDT
The fix for this is now live in production. If your manifest is not importing correctly into CloudForms or Subscription Asset Manifest, please download a new copy from access.redhat.com
Comment 8 Mike McCune 2013-08-16 14:11:39 EDT
getting rid of 6.0.0 version since that doesn't exist

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