Project

General

Profile

Actions

Bug #4379

closed

Foreign key constraint error on deleting a class

Added by Ollie Lawson about 10 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

On deleting a class interface availible via the drop down menu on the nav bar the system bombs out with the following:

Warning!

ERROR: update or delete on table "puppetclasses" violates foreign key constraint "environment_classes_puppetclass_id_fk" on table "environment_classes" DETAIL: Key (id)=(8) is still referenced from table "environment_classes".

Stack Trace:
PGError
ERROR: update or delete on table "puppetclasses" violates foreign key constraint "environment_classes_puppetclass_id_fk" on table "environment_classes" DETAIL: Key (id)=(8) is still referenced from table "environment_classes".
app/controllers/puppetclasses_controller.rb:42:in `destroy'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'


Files

Capture.PNG View Capture.PNG 30.3 KB Ollie Lawson, 02/18/2014 03:00 PM
foreman_class_removal_error.jpg View foreman_class_removal_error.jpg 138 KB Bryce Camp, 02/21/2014 04:53 PM

Related issues 4 (0 open4 closed)

Has duplicate Foreman - Bug #5225: Deleting a puppet-class: Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint failsDuplicate04/17/2014Actions
Has duplicate Foreman - Bug #5213: Error during delete a puppet classDuplicate04/16/2014Actions
Has duplicate Foreman - Bug #6045: deleting a class failsDuplicate06/03/2014Actions
Has duplicate Foreman - Bug #7255: unable to delete puppet classDuplicate08/25/2014Actions
Actions

Also available in: Atom PDF