Project

General

Profile

Actions

Bug #35031

closed

20211220185935_clean_duplicate_content_units db:migrate fails with child records

Added by Samir Jha almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

During db:migrate the database patch 20211220185935_clean_duplicate_content_units.rb is applied, but fails with the following error in /var/log/foreman-installer/katello.log:

2022-06-07 08:48:45 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: PG::ForeignKeyViolation: ERROR:  update or delete on table "katello_module_profiles" violates foreign key constraint "katello_mod_profile_rpm_mod_profile_id_fk" on table "katello_module_profile_rpms" 
2022-06-07 08:48:45 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: DETAIL:  Key (id)=(22) is still referenced from table "katello_module_profile_rpms".

More details here: https://community.theforeman.org/t/foreignkeyviolation-on-katello-module-profiles-during-db-migrate/28926

Actions

Also available in: Atom PDF