Bug 864936 - Product labels are not currently required to be unique.
Product labels are not currently required to be unique.
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Brad Buckingham
Corey Welton
: Triaged
Depends On:
Blocks: 874744
  Show dependency treegraph
 
Reported: 2012-10-10 08:31 EDT by Brad Buckingham
Modified: 2014-06-05 06:11 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, a product label can be reused by another product in the same provider or organization. A unique label is now required for all products within the same organization. Using a duplicate label for different products in the same organization will generate an error.
Story Points: ---
Clone Of:
: 874744 (view as bug list)
Environment:
Last Closed: 2012-12-04 14:57:07 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)

  None (edit)
Description Brad Buckingham 2012-10-10 08:31:47 EDT
Description of problem:

When creating a product for a provider, the user may set the product label to a value that is already used by another product in that provider or organization.

Should product labels be unique?  Note: The product label is included as part of the client's redhat.repo (e.g. [orglabel_productlabel_repolabel]).

If we need the labels to be unique, we'll need to ensure that the algorithm used for auto-setting them takes this in to account (e.g. label+dbid).  This will be necessary for both creation of custom products as well as those created as part of a manifest import.

Version-Release number of selected component (if applicable):
github master

How reproducible:
always

Steps to Reproduce:

1. Attempt to create multiple products with the same label.
  
Actual results:

katello> product create --org ACME_Corporation --provider prov1 --name product1 --label product1
Successfully created product [ product1 ]

katello> product create --org ACME_Corporation --provider prov1 --name product1 --label product1
Successfully created product [ product1 ]


Expected results:

Second product create should fail.

Additional info:
Comment 3 Brad Buckingham 2012-11-02 17:42:20 EDT
katello github pull request : https://github.com/Katello/katello/pull/991

The above pull request ensures that product labels are unique within the organization where the product is created.  The following is the high-level behavior:

- UI:
  - If the user submits a request to create a product and and the request does not include a label, a unique label will be created and assigned. The user will be informed with a 'message' notice.
  - If the user submits a request to create a product and the request includes a label that has already been assigned to a product in that organization, a unique label will be created and assigned. The user will be informed with a 'message' notice.
  - If the user submits a request to create a product and the request includes a unique label, that label is assigned to the product.

- API/CLI:
  - If the user submits a request to create a product and the request does not include a label, a unique label will be created and assigned.
  - If the user submits a request to create a product and the request includes a label that has already been assigned to a product in that organization, a validation error is returned.
  - If the user submits a request to create a product and the request includes a unique label, that label is assigned to the product.
Comment 6 Corey Welton 2012-11-06 11:53:27 EST
QE Verified:

cfse> product create --org Test_Org_1352219207 --provider "Google Products_provider" --name product1 --label product1
Successfully created product [ product1 ]
cfse> product create --org Test_Org_1352219207 --provider "Google Products_provider" --name product1 --label product1
Validation failed: Label has already been taken


CloudForms System Engine Version: 1.1.12-20.el6cf
Comment 8 errata-xmlrpc 2012-12-04 14:57:07 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 9 Mike McCune 2013-08-16 14:18:36 EDT
getting rid of 6.0.0 version since that doesn't exist
Comment 10 Tomas Lestach 2014-06-05 06:11:12 EDT
A very similar issue discovered in 6.0.3: Bug 1105061

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