Bug 758219
| Summary: | Promoting two products with the same repo name fails on promotion | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Ivan Necas <inecas> | ||||
| Component: | API | Assignee: | Bryan Kearney <bkearney> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jitendra Yejare <jyejare> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.0.1 | CC: | gkhachik, jlaska, sghai | ||||
| Target Milestone: | Unspecified | ||||||
| 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-08-22 18:09:19 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 747354 | ||||||
| Attachments: |
|
||||||
|
Description
Ivan Necas
2011-11-29 15:04:25 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
Tested workaround: * Use a unique repository name for all Custom provider product repositories Fixed in c7dd7596fe8abd595fa8e7cd9dbe61023b4fc488 by prefixing content label for a custom product with product id to achieve the uniqueness. Tagged in 0.1.136-1 just a heads up: in RHSM reponames will come with <cpid>-<reponame> from now on :) 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']) getting rid of 6.0.0 version since that doesn't exist |