Bug 857728

Summary: Shoudl be able to use the same GPG key on multiple Orgs
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED NOTABUG QA Contact: Og Maciel <omaciel>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: mmccune
Target Milestone: UnspecifiedKeywords: Triaged
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-09-17 17:24:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
traceback none

Description Og Maciel 2012-09-16 15:38:25 UTC
Created attachment 613430 [details]
traceback

Description of problem:

Seems that we have a constraint on how many times a GPG key can be used for organizations. I don't see why this is the case and would argue that one could use the same GPG key on multiple orgs.

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

* 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

How reproducible:


Steps to Reproduce:
1. Upload the same GPG key on multiple (different) organizations; shouldn't matter what you name your key.
2.
3.
  
Actual results:

The web ui gets pretty "scrambled" (see BZ #857727) and the following error is displayed in the web ui:

      ERROR: duplicate key value violates unique constraint "index_gpg_keys_on_organization_id_and_name" (PGError)
    Click here for more details.


Expected results:


Additional info:

See attached traceback file.

Comment 1 Og Maciel 2012-09-16 15:44:39 UTC
FWIW, the GPG keys seems to get added in the end.

Comment 3 Justin Sherrill 2012-09-17 16:20:31 UTC
This wasn't really ever an issue, root cause was https://bugzilla.redhat.com/show_bug.cgi?id=857727.  Uploading a gpg key would submit twice, causing odd errors. 

Should be fixed in PR https://github.com/Katello/katello/pull/682

Comment 4 Justin Sherrill 2012-09-17 16:21:40 UTC
a1e2f99adc8294a0bdb07ea45c9132361a36dcf1

Comment 5 Og Maciel 2012-09-17 17:24:57 UTC
Closing it as this was indeed triggered by BZ 857727

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.noarc