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 1114646 - 500 FK error when deleting old image in compute resource
Summary: 500 FK error when deleting old image in compute resource
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: jmagen@redhat.com
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-30 14:26 UTC by Bryan Kearney
Modified: 2019-09-25 20:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:21:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 4416 0 None None None 2016-04-22 15:13:15 UTC

Description Bryan Kearney 2014-06-30 14:26:15 UTC
After a compute resource is edited, or for some reason it no longer has an image, if Foreman had any images in the Compute Resource, deleting them will be impossible through the UI and will throw a 500 error.


<pre>
Warning!
Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails (`foreman`.`hosts`, CONSTRAINT `hosts_image_id_fk` FOREIGN KEY (`image_id`) REFERENCES `images` (`id`)): DELETE FROM `images` WHERE `images`.`id` = 3

</pre>

Comment 1 Bryan Kearney 2014-06-30 14:26:17 UTC
Created from redmine issue http://projects.theforeman.org/issues/4416

Comment 2 Bryan Kearney 2014-06-30 14:26:22 UTC
Upstream bug assigned to jmagen

Comment 3 Bryan Kearney 2014-06-30 14:37:39 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/4416 has been closed

Comment 6 Corey Welton 2014-08-20 15:03:00 UTC
Verified in Satellite-6.0.4-RHEL-6-20140813.2 - resource can no longer be deleted if images are associated w it.

Comment 7 Bryan Kearney 2014-09-11 12:21:05 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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