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 #1

Updated by Jon Skarpeteig almost 10 years ago

Or better yet, remove the proxy from the hostgroup

Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Is duplicate of Bug #5788: before_destroy missing from EnsureNotUsedBy.new in SmartProxy model added
Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Duplicate

We've just made a change in #5788 which will show a proper error message indicating which other resources rely on that smart proxy. This'll be in 1.5.1.

Actions #4

Updated by Dominic Cleal almost 10 years ago

  • Related to Bug #5904: Deleting a smart proxy should be easier due to number of associations added
Actions

Also available in: Atom PDF