Bug 749517 - product name uniqueness - org scope *only*
Summary: product name uniqueness - org scope *only*
Keywords:
Status: CLOSED DUPLICATE of bug 784712
Alias: None
Product: Katello
Classification: Retired
Component: Webservice API
Version: 1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 1.x
Assignee: Ivan Necas
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-27 10:26 UTC by Garik Khachikyan
Modified: 2015-01-04 21:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-28 08:52:05 UTC


Attachments (Terms of Use)

Description Garik Khachikyan 2011-10-27 10:26:55 UTC
Description of problem:
Seems that having product name the same in both organizations is not working recently.

Version-Release number of selected component (if applicable):
katello-0.1.96-1.git.15.371d68d.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.org create --name org1
2.org create --name org2
3. provider create --name provider1_1 --org org1 --type custom
4. provider create --name provider1_2 --org org2 --type custom
5. product create --name pulpF15-x86_64 --org org1 --provider provider1_1 --url http://repos.fedorapeople.org/repos/pulp/pulp/fedora-15/x86_64/ --assumeyes
6. doing the same for org2 & provider1_2 *FAILS*
  
Actual results:
Candlepin JDBC exception:
---
RestClient::InternalServerError: Candlepin::Product: 500 Internal Server Error {"displayMessage":"Runtime Error Could not execute JDBC batch update at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"} (POST /candlepin/products/)
---

Expected results:
no exception - products are unique in scopes of orgs only.

Additional info:

Comment 1 Garik Khachikyan 2011-10-27 10:29:04 UTC
Oct 27 12:26:03 [http-8443-2] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: duplicate key value violates unique constraint "cp_product_name_key"

Comment 2 Devan Goodwin 2012-01-05 15:05:48 UTC
Products are global in Candlepin, both the product ID and it's name. It may be possible that we could remove the unique constraint on name but it's a little worrisome for us. 

Propose Katello tries to keep the product names unique and handle the situation when they're not.

If this is unacceptable let us know and we can investigate removing that unique product name.

Comment 3 Ivan Necas 2012-02-28 08:52:05 UTC

*** This bug has been marked as a duplicate of bug 784712 ***


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