Run rpm-datarepair 4007 on upgrade#1075
Merged
ehelms merged 1 commit intotheforeman:masterfrom Mar 20, 2026
Merged
Conversation
ianballou
reviewed
Mar 17, 2026
Contributor
ianballou
left a comment
There was a problem hiding this comment.
I haven't tested it but it's generally looking solid. One comment about the existing data repair command.
| # Do not fail if unavailable | ||
| with_spinner('Running pulpcore-manager rpm-datarepair 4007') do |spinner| | ||
| exit_status, output = execute_with_status(pulpcore_manager('rpm-datarepair 4007')) | ||
| if exit_status != 0 && output.include?("Unknown issue: '4007'") |
Contributor
There was a problem hiding this comment.
+1 to checking if the script exists since it's not RPM packaged yet.
pavanshekar
reviewed
Mar 17, 2026
pavanshekar
left a comment
There was a problem hiding this comment.
Hi @qcjames53! I tested this PR and the functionality works correctly. Successfully fixes repositories with empty package_signing_fingerprint and gracefully handles when commands are unavailable.
I have one comment about the placement in the upgrade scenario.
253a0fe to
6a771d7
Compare
pavanshekar
reviewed
Mar 18, 2026
pavanshekar
approved these changes
Mar 19, 2026
pavanshekar
left a comment
There was a problem hiding this comment.
Thanks for making the changes! Works well 👍
ehelms
approved these changes
Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a call to run
pulpcore-manager rpm-datarepair 4007as a component of the rpm_datarepair procedure, which will convert certain empty strings in the pulp DB to null values. Added that procedure to thesatellite_upgradescenario.Considerations
pulp_rpm 1263 added
rpm-datarepair 4007as a valid operation; it's being backported to 3.27, 3.29, 3.32, and 3.35. However, I don't think I can guarantee users will have the correct Z version of pulp-rpm installed. I made this fail gracefully, with a small message indicating the 4007 call was skipped / unsuccessful. I am unable to have the rpm_datarepair procedure fail regularly, as is it is a component of the sat upgrade. I would rather this at least output a message to stdout. Does my approach look reasonable?Testing steps
Upgrade Pulp and the Pulp dependencies to Pulp 3.105
We need at least pulpcore 3.105 and pulp-rpm 3.35.2 for the 4007 fix to be packaged. If you need any help with this, please let me know. I can always send you a VM snapshot.
sudo dnf config-manager --set-enabled crb,sudo dnf install -y python3.12 python3.12-pip python3.12-devel, andpython3.12 --versionto verify.Note pulp-ostree required these dependencies for me:
sudo dnf install -y cairo-devel gobject-introspection-devel cairo-gobject-devel.Note: I also needed to run
sudo python3.12 -m pip install psycopg2-binary.3. Edit
/etc/systemd/system/pulpcore-api.service- Change to:ExecStart=/usr/local/bin/pulpcore-api4. Edit
/etc/systemd/system/pulpcore-content.service- Change to:ExecStart=/usr/local/bin/pulpcore-content5. Edit
/etc/systemd/system/pulpcore-worker@.service- Change to:ExecStart=/usr/local/bin/pulpcore-worker6. I had to upgrade postgresql with the following steps (might not be required for you):
sudo systemctl daemon-reloadsudo systemctl restart pulpcore* --allsudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' /usr/local/bin/pulpcore-manager migratesudo pulp status.Testing this PR
lib/foreman_maintain/concerns/pulp_common.rb, modifypulpcore_managerto look like this:sudo bundle exec foreman-maintain advanced procedure run pulpcore-rpm-datarepairto test the changes.