Actions
Bug #10645
closedERROR: update or delete on table "hosts" violates foreign key constraint "tokens_host_id_fk" on table "tokens" DETAIL: Key (id)=(2) is still referenced from table "tokens".
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Unable to delete a discovered host with Foreman 1.8.1
PGError
ERROR: update or delete on table "hosts" violates foreign key constraint "tokens_host_id_fk" on table "tokens" DETAIL: Key (id)=(2) is still referenced from table "tokens".
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Updated by Dominic Cleal over 9 years ago
- Is duplicate of Bug #10535: Tokens are created for managed hosts after validation added
Updated by Dominic Cleal over 9 years ago
- Status changed from New to Duplicate
I believe this has been fixed under #10535, which we should be able to include in a future release. In the meantime, you may have to remove the duplicate tokens from the database manually by running "sudo -u foreman psql" and deleting the rows in the tokens table with duplicate host IDs.
Actions