Fixes #38504 - delete installed package dupes before evr migration #11421
+18
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes introduced in this pull request?
Deletes duplicate
katello_installed_package
records andkatello_host_installed_package
records to avoid issues from https://postgresql.verite.pro/blog/2018/08/27/glibc-upgrade.htmlThis is just to help users complete their upgrade. Their databases still need a full reindex after getting past this.
Considerations taken when implementing this change?
I tried to keep the same logical flow as the solution in https://access.redhat.com/solutions/7053489.
What are the testing steps for this pull request?
InstalledPackage
records andHostInstalledPackage
records linked up to them. Ensure some host has a number of duplicates assigned to it along with a spread across other hosts. This is important to check because the code was written specifically to not error out if aHostInstalledPackage
is "fixed" and results in a duplicate being saved that originally pointed to one of the duplicateInstalledPackage
records.Alternatively, the code could be tested outside of the migration with the duplicates being the test point.
Summary by Sourcery
Remove duplicate katello_installed_package and katello_host_installed_package records in the up migration to ensure EVR index recreation succeeds during upgrades
Bug Fixes:
Enhancements: