Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 758219 - Promoting two products with the same repo name fails on promotion
Summary: Promoting two products with the same repo name fails on promotion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Bryan Kearney
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: katello-blockers
TreeView+ depends on / blocked
 
Reported: 2011-11-29 15:04 UTC by Ivan Necas
Modified: 2019-09-25 21:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:09:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
/var/log/katello/production.log (18.66 KB, text/plain)
2011-12-09 14:55 UTC, James Laska
no flags Details

Description Ivan Necas 2011-11-29 15:04:25 UTC
Description of problem:
When there are two custom products with the same repo name (which can happend), when promoting the second product into the same environment, it fails on Candlepin exception

Version-Release number of selected component (if applicable):
katello-0.1.116-1.fc16.x86_64
candlepin-0.4.27-1.fc15
pulp-0.0.244-5.fc15

How reproducible:
Very

Steps to Reproduce:
1.Create custom product "One" with repo name "base", synchronize and promote to another env
2.Create custom product "Two" with repo name "base", synchronize and promote to the same env
  
Actual results:
"displayMessage":"Runtime Error org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (POST /candlepin/content/)


Expected results:
Succesfully promoted

Comment 2 James Laska 2011-12-09 14:55:43 UTC
Created attachment 544587 [details]
/var/log/katello/production.log

Description of problem:

When attempting to add a repository to a Custom provider product, I get the following error:

{"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"}

Version-Release number of selected component (if applicable):
 * candlepin-0.5.4-1.el6.src.rpm
 * katello-0.1.135-2.el6.src.rpm
 * katello-certs-tools-1.0.1-2.el6.src.rpm
 * katello-cli-0.1.23-3.el6.src.rpm
 * katello-configure-0.1.31-2.el6.src.rpm
 * katello-httpd-ssl-key-pair-1.0-1.src.rpm
 * katello-qpid-broker-key-pair-1.0-1.src.rpm
 * katello-trusted-ssl-cert-1.0-1.src.rpm
 * pulp-0.0.254-4.el6.src.rpm

How reproducible:

Steps to Reproduce:
1. Import a Red Hat providor manifest, and enable 2 repositories (RHEL5.7 and RHEL6.1)
2. Create a custom provider
3. Add a product to newly created custom provider
4. Add a repo to new product
5. Create another product in the custom provider6 
6. Create another repository using the same name as step#4
  
Actual results:

{"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"}

Expected results:

No error ... or if repo names from different products must be *unique* ... offer a friendly warning message to the user.

Additional info:
 * see attached /var/log/katello/production.log

Comment 3 James Laska 2011-12-09 15:03:28 UTC
Tested workaround:
 * Use a unique repository name for all Custom provider product repositories

Comment 4 Ivan Necas 2011-12-09 18:00:31 UTC
Fixed in c7dd7596fe8abd595fa8e7cd9dbe61023b4fc488 by prefixing content label for a custom product with product id to achieve the uniqueness.

Tagged in 0.1.136-1

Comment 5 Garik Khachikyan 2011-12-19 12:25:47 UTC
just a heads up: in RHSM reponames will come with <cpid>-<reponame> from now on :)

Comment 6 Sachin Ghai 2011-12-28 10:00:55 UTC
Verified with following katello build:

[root@dhcp201-197 ~]# rpm -qa | grep katello
katello-glue-pulp-0.1.155-1.el6.noarch
katello-configure-0.1.48-1.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-cli-common-0.1.31-1.el6.noarch
katello-glue-foreman-0.1.155-1.el6.noarch
katello-common-0.1.155-1.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-0.1.155-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-repos-0.1.4-1.el6.noarch
katello-cli-0.1.31-1.el6.noarch
katello-glue-candlepin-0.1.155-1.el6.noarch
katello-all-0.1.155-1.el6.noarch
katello-certs-tools-1.0.1-1.el6.noarch
[root@dhcp201-197 ~]# 


I created two diff products f15 and f16 with same repo name and promoted them to same env. And this issue is not reproducible.

created provider:
====================
katello> provider create --name fedora --org sghai_org
Successfully created provider [ fedora ]


Created two diff products:
==========================
katello> product create --org sghai_org --provider fedora --name f15
Successfully created product [ f15 ]
katello> product create --org sghai_org --provider fedora --name f16
Successfully created product [ f16 ]

Created two repos having same name:
========================================
katello> repo create --org sghai_org --name x86_64 --product f15 --url http://download.eng.pnq.redhat.com/pub/fedora/linux/releases/15/Fedora/x86_64/os/
Successfully created repository [ x86_64 ]
katello> repo create --org sghai_org --name x86_64 --product f16 --url http://download.eng.pnq.redhat.com/pub/fedora/linux/releases/16/Fedora/x86_64/os/
Successfully created repository [ x86_64 ]
katello> 

synched both repos:
=====================
katello> repo synchronize --name x86_64 --product f15 --org sghai_org
Progress: [##################################################] 100.0%
Repo [ x86_64 ] synced                                                
katello> 

katello> repo synchronize --name x86_64 --product f16 --org sghai_org
Progress: [##################################################] 100.0%
Repo [ x86_64 ] synced    


promoted both repos to same env
==================================
katello> changeset create --org sghai_org --env test --name promote_f15
Successfully created changeset [ promote_f15 ] for environment [ test ]
katello> changeset update --org sghai_org --name promote_f15 --environment test --add_product f15
Successfully updated changeset [ promote_f15 ]
katello> changeset promote --name promote_f15 --org sghai_org --environment test
Changeset [ promote_f15 ] promoted         


katello> changeset create --org sghai_org --env test --name promote_f16
Successfully created changeset [ promote_f16 ] for environment [ test ]
katello> changeset update --org sghai_org --name promote_f16 --environment test --add_product f16
Successfully updated changeset [ promote_f16 ]
katello> changeset promote --name promote_f16 --org sghai_org --environment test
Changeset [ promote_f16 ] promoted         
katello> 

production log for f15 promotion:
==================================

2011-12-28 15:18:46,032 2514:140364790871808: pulp.server.tasking.task:INFO: task:440 Task succeeded: Task 66938847-3135-11e1-af36-525400442f6d: _clone(sghai_org-test-f15-x86_64, feed=parent, progress_callback=<bound method RepoCloneTask.progress_callback of <pulp.server.api.repo_clone_task.RepoCloneTask object at 0x7fa92c0b52d0>>, clone_name=x86_64, relative_path=sghai_org/test/custom/f15/x86_64, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7fa92c0b5290>, filters=[], id=sghai_org-f15-x86_64, groupid=['product:1325054347267', 'env:4', 'org:2', 'content:1325054606650'])

production log for f16 promotion:
=============================
2011-12-28 15:18:46,032 2514:140364790871808: pulp.server.tasking.task:INFO: task:440 Task succeeded: Task 5fb581dc-3137-11e1-9db3-525400442f6d: _clone(sghai_org-test-f16-x86_64, feed=parent, progress_callback=<bound method RepoCloneTask.progress_callback of <pulp.server.api.repo_clone_task.RepoCloneTask object at 0x7fa975c97810>>, clone_name=x86_64, relative_path=sghai_org/test/custom/f16/x86_64, synchronizer=<pulp.server.api.synchronizers.YumSynchronizer object at 0x7fa975c97690>, filters=[], id=sghai_org-f16-x86_64, groupid=['product:1325054377885', 'env:4', 'org:2', 'content:1325054658361'])

Comment 9 Mike McCune 2013-08-16 18:11:19 UTC
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.