Project

General

Profile

Actions

Bug #10645

closed

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".

Added by Yves Degauquier almost 9 years ago. Updated almost 9 years ago.

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

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'

Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #10535: Tokens are created for managed hosts after validationClosedOri Rabin05/18/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Is duplicate of Bug #10535: Tokens are created for managed hosts after validation added
Actions #2

Updated by Dominic Cleal almost 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

Also available in: Atom PDF