Red Hat Bugzilla – Bug 864936
Product labels are not currently required to be unique.
Last modified: 2014-06-05 06:11:12 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:
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.
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
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
getting rid of 6.0.0 version since that doesn't exist
A very similar issue discovered in 6.0.3: Bug 1105061