Bug 1114646 - 500 FK error when deleting old image in compute resource
Summary: 500 FK error when deleting old image in compute resource
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: jmagen@redhat.com
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Keywords: Triaged
Depends On:
TreeView+ depends on / blocked
Reported: 2014-06-30 14:26 UTC by Bryan Kearney
Modified: 2016-04-22 15:13 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2014-09-11 12:21:05 UTC

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 4416 None None None 2016-04-22 15:13 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.

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


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@redhat.com

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.