Bug 829208 - Manifest import fail after creating a custom product
Manifest import fail after creating a custom product
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
x86_64 Unspecified
high Severity high (vote)
: Unspecified
: --
Assigned To: Ivan Necas
Sachin Ghai
: Triaged, ZStream
Depends On:
Blocks: 834010
  Show dependency treegraph
Reported: 2012-06-06 04:35 EDT by Sachin Ghai
Modified: 2013-08-16 14:12 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
System Engine did not include custom products when checking products on manifest import. This caused manifest imports to fail after custom product creation. This fix includes custom products when checking existing products. Manifests now import correctly.
Story Points: ---
Clone Of:
: 834010 (view as bug list)
Last Closed: 2012-12-04 14:46:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Complete error log from production.log (21.74 KB, application/octet-stream)
2012-06-06 04:38 EDT, Sachin Ghai
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-04 19:39:57 EST

  None (edit)
Description Sachin Ghai 2012-06-06 04:35:10 EDT
Description of problem:
Facing issue while importing manifest on latest puddle. Manifest import fails immediately after creating custom product.

I used the same manifest while 1.0 RC testing. And I was able to sync repos.

UI says:
Subscription manifest upload for provider 'Red Hat' failed.
Reason: Validation failed: Products within an organization must have unique name.
If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data.
Click here for more details.

Please note that this is a fresh environment and I'm importing the manifest first time.. No other manifest is imported before.

Version-Release number of selected component (if applicable):
[root@dhcp201-221 ~]# rpm -qa | grep katello-0

How reproducible:

Steps to Reproduce:
1. Create a custom product 
2. Import manifest
Actual results:
Actual Result: Manifest import fail with error:

[ERROR: 2012-06-06 07:06:04 #5769] Failed to create product pulp for provider Glue::Candlepin::Product: Validation failed: Products within an organization must have unique name., /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:49:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:30:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_transaction_returning_status'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!'
/usr/share/katello/app/models/lazy_accessor.rb:108:in `save!'
/usr/share/katello/app/models/glue/candlepin/product.rb:67:in `import_marketing_from_cp'
/usr/share/katello/app/models/glue/provider.rb:198:in `import_products_from_cp'

Expected results:
Manifest should be imported succesfully

Additional info:
Comment 1 Sachin Ghai 2012-06-06 04:38:42 EDT
Created attachment 589777 [details]
Complete error log from production.log
Comment 3 Ivan Necas 2012-06-06 05:16:45 EDT
The pull request fixing this issue opened against Katello:

Comment 5 Tom McKay 2012-06-12 15:54:20 EDT
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 8cb8c62ca9ba667e87193166b5f4e07d8147c778
  Author: Ivan Necas <inecas@redhat.com>
  Date:   2012-06-06 (Wed, 06 Jun 2012)
Comment 6 James Laska 2012-06-18 15:33:42 EDT
I'm also seeing this failure while testing manifest import while custom providers exist.


:: [   INFO   ] ::  * candlepin-0.6.5-1.el6_2.src.rpm
:: [   INFO   ] ::  * katello-0.1.317-1.el6_2.src.rpm
:: [   INFO   ] ::  * katello-candlepin-cert-key-pair-1.0-1.src.rpm
:: [   INFO   ] ::  * katello-certs-tools-1.0.7-1.el6_3.src.rpm
:: [   INFO   ] ::  * katello-cli-0.1.111-1.el6_2.src.rpm
:: [   INFO   ] ::  * katello-configure-0.1.110-1.el6_3.src.rpm
:: [   INFO   ] ::  * katello-qpid-broker-key-pair-1.0-1.src.rpm
:: [   INFO   ] ::  * katello-qpid-client-key-pair-1.0-1.src.rpm
:: [   INFO   ] ::  * katello-selinux-0.1.10-1.el6.src.rpm
:: [   INFO   ] ::  * pulp-1.0.4-1.el6.src.rpm
:: [   INFO   ] ::  * redhat-release-server-6Server-
:: [   INFO   ] ::  * subscription-manager-0.99.19-1.el6.src.rpm
Comment 9 Sachin Ghai 2012-09-18 08:17:15 EDT
Verified with following CFSE build:


Verified that manifest import is successful after creating a custom product.
Comment 11 Hayk Hovsepyan 2012-12-04 10:15:25 EST
Automation is covered in test class "com.redhat.qe.katello.tests.e2e.StackedSubscriptions"
Comment 12 errata-xmlrpc 2012-12-04 14:46:33 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Comment 13 Mike McCune 2013-08-16 14:12:53 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.