Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 817123 - deleted system template not removed from activation key
Summary: deleted system template not removed from activation key
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-27 18:39 UTC by Tom McKay
Modified: 2019-09-26 14:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Activation keys referenced in deleted system templates caused the template to remain in the system_template table and the activation_keys table. This prevents the deletion of the template due to a dependency issue. This update uses a deletion changeset, which deletes system templates from environments and also deletes the association to the activation key.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:44:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Tom McKay 2012-04-27 18:39:15 UTC
Create and promote a system template. Now create an activation key that references that system template. Finally, delete the system template.

Expected: The system template would also be removed from the activation key.
Actual: Template is still listed in UI on act key page.

Database diving still shows the system template in system_templates table, as well as association to it in activation_keys table.

Comment 2 Lukas Zapletal 2012-05-02 12:49:37 UTC
What you want is cascade deletion. Is this really what we want to do? I mean, activation keys can be distributed across companies/users and template removal could lead to deletion of activation key without letting know to the user.

Another solution could be error message requesting user to remove all activation key references first, which seems to be more appropriate for me.

Mike - opinion about this?

Comment 3 Mike McCune 2012-05-02 15:12:52 UTC
We should be cascading the deletes on the association tables but not on the primary objects themselves.  Sounds like we need a dependent => destroy in the model for these objects

Comment 4 Mike McCune 2012-05-11 14:43:35 UTC
After a bit more discussion Lukáš pointed out that it may be fine to delete from the Library but we can't mass delete templates from all the promoted environments without a changeset.

This needs to be taken care of in our Content Deletion story we are going to implement in 1.1

Comment 5 Lukas Zapletal 2012-05-29 07:11:29 UTC
Removing 1.0.z flag as this is going to be part of new feature. Mike if you still want to deliver temporary workaround, put it back.

Comment 6 Mike McCune 2012-08-03 17:11:11 UTC
This is addressed in Content Deletion which is part of 1.1.  Will validate this scenario during testing/dev

Comment 7 Mike McCune 2012-08-27 18:19:29 UTC
now with a Deletion changeset you can go in and delete System Templates from environments which deletes the association to the Activation Key.  I tested this and it worked fine.

Comment 9 Kedar Bidarkar 2012-09-21 07:17:06 UTC
Below are the steps followed for verification.

1) Created and Promoted a template to Dev env
2) Created an activation key ( act_193_keys) and added the Dev_template to it.
3) Attached is the screenshot with the above state 'act_keys_dev_template.png'
4) Created a Deletion changeset, for the Dev env to delete the Dev_template and promoted it.
5) The Association of the template is removed from the activation key act_193_keys.
6) Attached is the screenshot with the template association removed. 'act_keys_No_template.png'

.

Comment 12 Kedar Bidarkar 2012-09-21 07:20:07 UTC
small correction: comment11 should be read as 

"Act_keys with the template from Dev env removed via deletion changeset"

Comment 14 errata-xmlrpc 2012-12-04 19:44:59 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/RHSA-2012-1543.html


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