Bug 829208 - Manifest import fail after creating a custom product
Manifest import fail after creating a custom product
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.1
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)
Environment:
Last Closed: 2012-12-04 14:46:33 EST
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)
Complete error log from production.log (21.74 KB, application/octet-stream)
2012-06-06 04:38 EDT, Sachin Ghai
no flags Details

  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
katello-0.1.313-1.el6_3.noarch


How reproducible:
always

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

production.log:
===============
[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:

https://github.com/Katello/katello/pull/183
Comment 5 Tom McKay 2012-06-12 15:54:20 EDT
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 8cb8c62ca9ba667e87193166b5f4e07d8147c778
      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.

https://beaker.engineering.redhat.com/jobs/249790

:: [   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-6.3.0.3.el6.src.rpm
:: [   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:

katello-qpid-client-key-pair-1.0-1.noarch
katello-common-1.1.12-7.el6cf.noarch
katello-all-1.1.12-7.el6cf.noarch
katello-cli-1.1.8-4.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-glue-candlepin-1.1.12-7.el6cf.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-configure-1.1.9-3.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-4.el6cf.noarch
katello-glue-pulp-1.1.12-7.el6cf.noarch
katello-1.1.12-7.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch

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.

http://rhn.redhat.com/errata/RHSA-2012-1543.html
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.