Bug #4379
closed
Foreign key constraint error on deleting a class
Added by Ollie Lawson almost 11 years ago.
Updated over 7 years ago.
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
I am experiencing the same issue
- Has duplicate Bug #5225: Deleting a puppet-class: Mysql2::Error: Cannot delete or update a parent row: a foreign key constraint fails added
- Has duplicate Bug #5213: Error during delete a puppet class added
- Has duplicate Bug #6045: deleting a class fails added
I'm also facing this problem.
Even removing the Puppet module doesn't fix this at the moment. I'm stuck with some classes that are not there but FM thinks they are (in use).
Any ideas ?
I'm on 1.5.2 at the moment.
OK, update... fixed. It seems that Foreman is importing "conflicting" classes form other modules with the same name (as you copy them over and edit them half)
Hello,
I'm also running Centos 6.5 and have a similar issue while trying to delete classes from foreman web UI.
Puppet version is latest from puppetlabs repo - 3.6.2-1
Foreman version is 1.5.2-1, also current.
Only "exotic" aspect of my setup is I recently updated puppet from 2.7.x (EPEL) to 3.6.x (puppetlabs)
What kind of update did fix this for you Yama Kasi ? Is the UI delete button now working as expected ?
I was able to delete classes by manually removing them form their environment directory but I would like to be able to do that from the UI to ease collaboration with my colleagues.
- Has duplicate Bug #7255: unable to delete puppet class added
- Bugzilla link set to 1147379
this is quite odd, as the relation has dependent: true on it. How can we reproduce this?
- Status changed from New to Resolved
Also available in: Atom
PDF