Bug 820720 - Regression, candlepin 0.6.2-1 is failing to load older manifests with Incompatible error
Regression, candlepin 0.6.2-1 is failing to load older manifests with Incompa...
Status: CLOSED NOTABUG
Product: Subscription Asset Manager
Classification: Red Hat
Component: candlepin (Show other bugs)
1.0.0
Unspecified Unspecified
urgent Severity urgent
: rc
: 1.X
Assigned To: Devan Goodwin
SAM QE List
: Regression
Depends On:
Blocks: sam11-tracker
  Show dependency treegraph
 
Reported: 2012-05-10 14:58 EDT by Eric Sammons
Modified: 2012-08-02 08:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-11 10:28:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sammons 2012-05-10 14:58:23 EDT
Description of problem:
When attempting to load a manifest originally created for a older (SAM-1.0) install into SAM-1.1 the import fails with:

Subscription manifest upload for provider 'Red Hat' failed.
Reason: This distributor has already been imported by another owner
If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data.
Click here for more details.


tomcat6 log indicates that there is a compatibility issue.

May 10 14:51:35 [http-8443-4] INFO  org.candlepin.resource.OwnerResource - Importing archive /var/cache/tomcat6/temp/pfx3868586516083178803sfx for owner test
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import459155321828074755217924555408070
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import459155321828074755217924555408070
May 10 14:51:35 [http-8443-4] WARN  org.candlepin.sync.Importer - Incompatible rules: import version 0.5.5.2-1 older than our version 0.6.2.
May 10 14:51:35 [http-8443-4] WARN  org.candlepin.sync.Importer - Manifest data will be imported without rules import.
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.resource.OwnerResource - Import attempt completed for owner test

Version-Release number of selected component (if applicable):
candlepin-0.6.2-1.el6_2.noarch

Steps to Reproduce:
1. Login as admin
2. Navigate to content management tab
3. Upload a older manifest, created for sam-1.0 would be best
  
Actual results:
Fails

May 10 14:51:35 [http-8443-4] INFO  org.candlepin.resource.OwnerResource - Importing archive /var/cache/tomcat6/temp/pfx3868586516083178803sfx for owner test
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import459155321828074755217924555408070
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import459155321828074755217924555408070
May 10 14:51:35 [http-8443-4] WARN  org.candlepin.sync.Importer - Incompatible rules: import version 0.5.5.2-1 older than our version 0.6.2.
May 10 14:51:35 [http-8443-4] WARN  org.candlepin.sync.Importer - Manifest data will be imported without rules import.
May 10 14:51:35 [http-8443-4] INFO  org.candlepin.resource.OwnerResource - Import attempt completed for owner test

Expected results:
Rules should be ignored and manifest should load.

Additional info:
Comment 3 Devan Goodwin 2012-05-10 15:26:41 EDT
The rules should be just skipped quietly as you request, this is what the log message indicates and what I would expect from the code.

The message you are getting is complaining that you've already imported a manifest from the upstream distributor into another org, are you sure this is not the case? 

You can check which orgs have imported from which distributors in the Candlepin database with:

select account, displayname, upstream_uuid from cp_owner;
Comment 4 Devan Goodwin 2012-05-10 15:33:04 EDT
Very old manifest imports successfully on my SAM server installed from yesterday's latest.
Comment 6 Devan Goodwin 2012-05-11 08:18:34 EDT
Working on doing a new SAM install with exact build from yesterday but will take some time.

I could use more info here though, the bug report is indicating an error message that is descriptive and legitimately possible to hit, the logs show no stack traces and normal logging messages, so the report is just showing things that look perfectly normal, *provided* you or somebody else had already imported *any* manifest from the same distributor as your very old manifest. (but the bug report is not really clear on this)

Upstream consumer would be: 877cd1f1-1045-4f48-8aa2-a594a5bb09bb

Your other manifest is from: f8f239a0-3954-4e5b-ae9c-52f09fa7a17b, so it is possible your error message is legitimate and some other org is already using a manifest from 877cd1f1-1045-4f48-8aa2-a594a5bb09bb and thus it will not import.

If you could run the database query in comment #3 and/or clarify what was imported previously into which orgs, it would help very much to determine the state your server was in. Thanks!
Comment 7 Devan Goodwin 2012-05-11 09:14:45 EDT
Eric got me access to the system in question, and clarified that this happened in an automated testing environment. 

At least one org did get the older manifest imported previously:

activationkeyorgbPWd7d8h6h | 877cd1f1-1045-4f48-8aa2-a594a5bb09bb

Once this has happened, any other org who tries to import that older manifest is going to get the error in this bug, but this is normal behaviour, two orgs cannot import from the same upstream distributor one one SAM server.

I may be seeing an issue in the code where if the org above tried to *re-import* the same manifest, with force on, it would fail claiming another org is already using it. Going to try to reproduce this today.

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