Bug 831426

Summary: Users not able to import a subscription manifest
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Subscription ManagementAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.1CC: bkearney
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-15 14:24:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
python script to fix manifest format none

Description Mike McCune 2012-06-12 23:57:26 UTC
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 23:59:41 UTC
Created attachment 591302 [details]
python script to fix manifest format

Comment 2 Mike McCune 2012-06-13 00:00:13 UTC
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-13 00:03:04 UTC
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 12:37:56 UTC
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 14:24:01 UTC
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 18:11:39 UTC
getting rid of 6.0.0 version since that doesn't exist