Project

General

Profile

Actions

Bug #5903

closed

Deleting smart proxy from GUI fails

Added by Jon Skarpeteig almost 10 years ago. Updated almost 10 years ago.

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

Description

A proper error message should be generated instead, saying that an existing hostgroup is using the proxy.

Oops, we're sorry but something went wrong

Warning!
ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hostgroups_puppet_ca_proxy_id_fk" on table "hostgroups" DETAIL: Key (id)=(2) is still referenced from table "hostgroups".

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.

PG::ForeignKeyViolation
ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hostgroups_puppet_ca_proxy_id_fk" on table "hostgroups" DETAIL: Key (id)=(2) is still referenced from table "hostgroups".
app/controllers/smart_proxies_controller.rb:51:in `destroy'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #5904: Deleting a smart proxy should be easier due to number of associationsNew05/23/2014Actions
Is duplicate of Foreman - Bug #5788: before_destroy missing from EnsureNotUsedBy.new in SmartProxy modelClosedJoseph Magen05/19/2014Actions
Actions

Also available in: Atom PDF