Bug #35031
closed20211220185935_clean_duplicate_content_units db:migrate fails with child records
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
Updated by William Clark over 2 years ago
- Target version set to Katello 4.4.2
- Triaged changed from No to Yes
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
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.
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
Updated by The Foreman Bot over 2 years ago
- Fixed in Releases Katello 4.6.0 added
Updated by Samir Jha over 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|667324096159ef6c0950b40588e3f04cc427c1eb.
Updated by Samir Jha over 2 years ago
- Bugzilla link changed from 2118738 to 2118694