Bug 805709 - Package filter name is unique to entire system
Package filter name is unique to entire system
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Justin Sherrill
Og Maciel
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-03-21 17:10 EDT by Og Maciel
Modified: 2014-01-27 09:22 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Package filter restrictions for unique filter names were System Engine-wide. This prevented filters with the same function but set to different organizations from duplicating in name. This fix removes this restriction and makes the filter name unique within the organization. Package filters now share the same name provided they are in different organizations.
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 14:43:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Script to reproduce this. (1.75 KB, application/x-shellscript)
2012-03-21 17:10 EDT, Og Maciel
no flags Details
Adding package filter via the web ui (91.32 KB, image/png)
2012-03-21 17:11 EDT, Og Maciel
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-04 19:39:57 EST

  None (edit)
Description Og Maciel 2012-03-21 17:10:49 EDT
Created attachment 571855 [details]
Script to reproduce this.

Description of problem:

I'm not sure if this is a pulp bug or not, so please move it appropriately. Using the katello cli to create orgs, products and repos, I noticed that the filter name is not unique to an Organization or even to a product, but to the entire SE. I'm not sure why we have this strictiness for filter names, but I'd make the case that one should be able to use the same name for a filter if they're associated with different organizations. See attached script for instructions on how to test.

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

* candlepin-0.5.26-1.el6.noarch
* candlepin-tomcat6-0.5.26-1.el6.noarch
* katello-0.1.305-1.el6.noarch
* katello-all-0.1.305-1.el6.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.0.4-1.el6.noarch
* katello-cli-0.1.105-1.el6.noarch
* katello-cli-common-0.1.105-1.el6.noarch
* katello-common-0.1.305-1.el6.noarch
* katello-configure-0.1.106-1.el6.noarch
* katello-glue-candlepin-0.1.305-1.el6.noarch
* katello-glue-foreman-0.1.305-1.el6.noarch
* katello-glue-pulp-0.1.305-1.el6.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-0.1.9-1.el6.noarch
* pulp-1.0.0-5.el6.noarch
* pulp-admin-1.0.0-5.el6.noarch
* pulp-client-lib-1.0.0-5.el6.noarch
* pulp-common-1.0.0-5.el6.noarch
* pulp-selinux-server-1.0.0-5.el6.noarch

How reproducible:

Steps to Reproduce:
1. Run the attached script.
2. Also try to create 2 package filters with the same name inside 2 different organizations using the web ui
Actual results:

The web ui returns the following error notification:

Pulp::Filter: 409 Conflict "A filter with the id, pulp-filter, already exists" (POST /pulp/api/filters/)

Expected results:

I should be able to create package filters with the same name on different orgs.
Additional info:
Comment 1 Og Maciel 2012-03-21 17:11:39 EDT
Created attachment 571856 [details]
Adding package filter via the web ui

Adding package filter via the web ui
Comment 3 Justin Sherrill 2012-03-23 16:39:05 EDT
fyi, the reason you can't rename it or have two with the same name is because package filters store their name as the pulp id.  I have no idea why it was done this way, but it was.   So either pulp would need to add a name field, or we would.
Comment 4 Justin Sherrill 2012-04-02 13:35:22 EDT
katello commits.

this requires a schema change, so moving to 1.1 release.
Comment 6 Og Maciel 2012-09-14 17:41:15 EDT
Verified using:

* candlepin-0.7.8-1.el6cf.noarch
* candlepin-selinux-0.7.8-1.el6cf.noarch
* candlepin-tomcat6-0.7.8-1.el6cf.noarch
* katello-1.1.12-7.el6cf.noarch
* katello-all-1.1.12-7.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-4.el6cf.noarch
* katello-cli-common-1.1.8-4.el6cf.noarch
* katello-common-1.1.12-7.el6cf.noarch
* katello-configure-1.1.9-3.el6cf.noarch
* katello-glue-candlepin-1.1.12-7.el6cf.noarch
* katello-glue-pulp-1.1.12-7.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-1.el6cf.noarch
* pulp-1.1.12-1.el6cf.noarch
* pulp-common-1.1.12-1.el6cf.noarch
* pulp-selinux-server-1.1.12-1.el6cf.noarch
Comment 8 errata-xmlrpc 2012-12-04 14:43:28 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.


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