Project

General

Profile

Actions

Bug #23873

closed

Cannot destroy content view when it has content facet errata

Added by Jonathon Turel almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Content Views
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Found in nightly:

PG::ForeignKeyViolation: ERROR:  update or delete on table "katello_content_facets" violates foreign key constraint "katello_content_facet_errata_ca_id" on table "katello_content_facet_errata" 
DETAIL:  Key (id)=(1) is still referenced from table "katello_content_facet_errata".
: DELETE FROM "katello_content_facets" WHERE "katello_content_facets"."content_view_id" = $1 AND "katello_content_facets"."host_id" = 1 (ActiveRecord::InvalidForeignKey)
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:616:in `async_exec'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:616:in `block (2 levels) in exec_no_cache'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:615:in `block in exec_no_cache'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block (2 levels) in log'
/opt/rh/rh-ruby24/root/usr/share/ruby/monitor.rb:214:in `mon_synchronize'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block in log'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract_adapter.rb:604:in `log'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `exec_no_cache'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:603:in `execute_and_clear'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `exec_delete'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:145:in `delete'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/query_cache.rb:17:in `delete'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:510:in `delete_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/associations/has_many_through_association.rb:160:in `delete_records'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/associations/has_many_through_association.rb:133:in `delete_or_nullify_all_records'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/associations/collection_association.rb:159:in `delete_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/associations/collection_proxy.rb:500:in `delete_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/associations/collection_proxy.rb:1071:in `clear'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/lib/actions/katello/content_view/remove.rb:70:in `block in plan'

Related issues 1 (0 open1 closed)

Has duplicate Katello - Bug #23853: Organization delete fails with "update or delete on table "katello_content_facets" violates foreign key constraint "katello_content_facet_errata_ca_id""Duplicate06/07/2018Actions
Actions #1

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7435 added
Actions #2

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Justin Sherrill almost 6 years ago

  • Has duplicate Bug #23853: Organization delete fails with "update or delete on table "katello_content_facets" violates foreign key constraint "katello_content_facet_errata_ca_id"" added
Actions

Also available in: Atom PDF