Project

General

Profile

Actions

Bug #35031

closed

20211220185935_clean_duplicate_content_units db:migrate fails with child records

Added by Samir Jha over 2 years ago. Updated over 2 years 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 #1

Updated by William Clark over 2 years ago

  • Target version set to Katello 4.4.2
  • Triaged changed from No to Yes
Actions #2

Updated by Florian Faltermeier over 2 years ago

Samir Jha wrote:

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:

[...]

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

Same issue happens to me on upgrade vom Katello 4.3 to 4.4

Florian

Actions #3

Updated by Vladislav Bulygin over 2 years ago

Samir Jha wrote:

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:

[...]

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

Same problem with same versions.

Actions #4

Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Samir Jha
  • Pull request https://github.com/Katello/katello/pull/10196 added
Actions #5

Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases Katello 4.6.0 added
Actions #6

Updated by Samir Jha over 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Samir Jha over 2 years ago

  • Bugzilla link set to 2118738
Actions #8

Updated by Samir Jha over 2 years ago

  • Bugzilla link changed from 2118738 to 2118694
Actions

Also available in: Atom PDF