Project

General

Profile

Actions

Bug #11188

closed

on deleting a capsule: Operation FAILED: ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hosts_puppet_ca_proxy_id_fk" on table "hosts"

Added by Ori Rabin over 9 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1207972
Description of problem:

On deleting capsule from webUI, following error raised:

--
Operation FAILED: ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hosts_puppet_ca_proxy_id_fk" on table "hosts
--

production.log: ================

2015-04-01 12:14:37 [I] Processing by SmartProxiesController#index as HTML
2015-04-01 12:14:37 [I] Rendered smart_proxies/index.html.erb within layouts/application (25.1ms)
2015-04-01 12:14:37 [I] Rendered common/_searchbar.html.erb (3.7ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (3.2ms)
2015-04-01 12:14:37 [I] Rendered home/_user_dropdown.html.erb (4.3ms)
2015-04-01 12:14:37 [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2015-04-01 12:14:37 [I] Rendered home/_organization_dropdown.html.erb (4.6ms)
2015-04-01 12:14:37 [I] Rendered home/_location_dropdown.html.erb (4.0ms)
2015-04-01 12:14:37 [I] Rendered home/_org_switcher.html.erb (9.2ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (3.9ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (4.6ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (2.2ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (4.8ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (3.5ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (3.0ms)
2015-04-01 12:14:37 [I] Rendered home/_submenu.html.erb (4.3ms)
2015-04-01 12:14:37 [I] Write fragment views/tabs_and_title_records-3 (0.9ms)
2015-04-01 12:14:37 [I] Rendered home/_topbar.html.erb (49.6ms)
2015-04-01 12:14:37 [I] Rendered layouts/base.html.erb (51.3ms)
2015-04-01 12:14:37 [I] Completed 200 OK in 112ms (Views: 79.8ms | ActiveRecord: 7.2ms)
2015-04-01 12:14:43 [I] Processing by SmartProxiesController#destroy as HTML
2015-04-01 12:14:43 [I] Parameters: {"authenticity_token"=>"TjhkdNY1w4fqkuiURUn+FDFi9IcuBdx8s4bL8cUrI+o=", "id"=>"2-dhcp207-72-lab-eng-pnq-redhat-com"}
2015-04-01 12:14:43 [W] Operation FAILED: ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hosts_puppet_ca_proxy_id_fk" on table "hosts"
DETAIL: Key (id)=(2) is still referenced from table "hosts".

2015-04-01 12:14:43 [I] Rendered common/500.html.erb within layouts/application (5.6ms)
2015-04-01 12:14:43 [I] Rendered layouts/base.html.erb (1.4ms)
2015-04-01 12:14:43 [I] Completed 500 Internal Server Error in 79ms (Views: 9.5ms | ActiveRecord: 13.2ms)

Version-Release number of selected component (if applicable):
sat6.1 beta snap8
(Satellite-6.1.0-RHEL-7-20150324.0)

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
Operation FAILED: ERROR: update or delete on table "smart_proxies" violates foreign key constraint "hosts_puppet_ca_proxy_id_fk" on table "hosts"
DETAIL: Key (id)=(2) is still referenced from table "hosts".

Expected results:
capsule should be removed.
Additional info:


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #13515: Foreman exception triggered when editing a role filter or adding a new oneClosedTom Caspy02/02/2016Actions
Related to Foreman - Refactor #28565: Don't use AR's association_scopeClosedTomer BriskerActions
Actions

Also available in: Atom PDF