Bug 1007117 - Unable to delete an activation key after using it to register a system
Summary: Unable to delete an activation key after using it to register a system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tom McKay
QA Contact: sthirugn@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker 1015939
TreeView+ depends on / blocked
 
Reported: 2013-09-11 23:59 UTC by sthirugn@redhat.com
Modified: 2013-10-07 03:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1015939 (view as bug list)
Environment:
Last Closed: 2013-10-01 11:25:48 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 0 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 14:43:14 UTC

Description sthirugn@redhat.com 2013-09-11 23:59:58 UTC
Description of problem:
Unable to delete an activation key after using it to register a system

Version-Release number of selected component (if applicable):
* candlepin-0.8.25-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.25-1.el6sam.noarch
* candlepin-tomcat6-0.8.25-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-10.el6sat.noarch
* katello-cli-common-1.4.3-10.el6sat.noarch
* katello-common-1.4.3-12.el6sam_splice.noarch
* katello-configure-1.4.4-4.el6sat.noarch
* katello-glue-candlepin-1.4.3-12.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-12.el6sam_splice.noarch
* katello-headpin-1.4.3-12.el6sam_splice.noarch
* katello-headpin-all-1.4.3-12.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.34-1.el6sam.noarch
* thumbslug-selinux-0.0.34-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1. Log in to SAM UI
2. Create an Activation key and attach a subscription to it
3. Register and subscribe a client using this activation key
4. Attempt to remove the activation key

Actual results:
UI error:
ERROR: update or delete on table "activation_keys" violates foreign key constraint "key_pools_activation_key_id_fk" on table "key_pools" DETAIL: Key (id)=(1) is still referenced from table "key_pools". (PGError)
Click here for more details.

Expected results:
Activation key deleted successfully

Additional info:

Comment 2 sthirugn@redhat.com 2013-09-12 00:13:21 UTC
Correction: Refreshing the page removed the activation key from UI.  But trying to create another activation key with the same name errored out saying 

Validation Failed:
Name has already been taken

It seems like the previous activation key is partially removed and this is a problem and it needs to be fixed to remove all its references.

Comment 3 Tom McKay 2013-09-23 17:28:11 UTC
Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: eb3248f774bca8a7ecfdc1241ea5952c6caaf768
      https://github.com/Katello/katello/commit/eb3248f774bca8a7ecfdc1241ea5952c6caaf768
  Author: Tom McKay <thomasmckay>
  Date:   2013-09-23 (Mon, 23 Sep 2013)

Comment 5 sthirugn@redhat.com 2013-09-25 14:19:50 UTC
Verified. Worked fine in both UI and CLI

Version Tested:
* candlepin-0.8.26-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.26-1.el6sam.noarch
* candlepin-tomcat6-0.8.26-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-11.el6sat.noarch
* katello-cli-common-1.4.3-11.el6sat.noarch
* katello-common-1.4.3-16.el6sam_splice.noarch
* katello-configure-1.4.4-5.el6sam.noarch
* katello-glue-candlepin-1.4.3-16.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-16.el6sam_splice.noarch
* katello-headpin-1.4.3-16.el6sam_splice.noarch
* katello-headpin-all-1.4.3-16.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.34-1.el6sam.noarch
* thumbslug-selinux-0.0.34-1.el6sam.noarch

Comment 7 errata-xmlrpc 2013-10-01 11:25:48 UTC
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/RHEA-2013-1390.html


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