Bug #11188
closedon 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"
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:
Updated by Ori Rabin over 9 years ago
- Status changed from New to Assigned
- Assignee set to Ori Rabin
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2570 added
- Pull request deleted (
)
Updated by Dominic Cleal about 9 years ago
- Category set to Users, Roles and Permissions
- Translation missing: en.field_release set to 63
Updated by Ori Rabin about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 08d4fc31447487181f59e7be54121fc681f3a5b4.
Updated by Dominic Cleal almost 9 years ago
- Related to Bug #13515: Foreman exception triggered when editing a role filter or adding a new one added
Updated by Anonymous almost 5 years ago
- Related to Refactor #28565: Don't use AR's association_scope added
Updated by Tomer Brisker almost 5 years ago
- Triaged set to No
- Pull request https://github.com/theforeman/foreman/pull/2574 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/2570)