Red Hat Bugzilla – 1586336 – The checksum type configuration of yum distributor should always fallback to the scratchped if it is not explicitly set to use a particular checksum type by the user.
Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
The checksum type configuration of yum distributor should always fallback to the scratchped if it is not explicitly set to use a particular checksum type by the user.
When the checksum type of the upstream repository changed, syncing a "on_demand" repository will fail with the following error:
------------
Checksum type "sha1" is not available for all units in the repository. Make sure those units have been downloaded
------------
When syncing a repository, Pulp will update the checksum type in the repo scratchpad to match the checksum type of the upstream repository, but the checksum_type configuration in the distributor will remain no change. This will cause the above error due to data/configuration inconsistency.
The "get_repo_checksum_type" function in [1] will attempt to save the checksum type to the distributor configuration if it is not already set. In my opinion, It should not save the checksum type after falling back to the scratchpad. If the checksum type for the distributor is not explicitly set, it should always fallback to the scratchpad.
In other word, the distributor should follow the checksum type of the metadata when it is not explicitly set to use other checksum type by the user.
[1] https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/distributors/yum/configuration.py#L345
Comment 1pulp-infra@redhat.com
2018-06-06 13:52:41 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 2pulp-infra@redhat.com
2018-06-06 13:52:44 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 6pulp-infra@redhat.com
2018-06-29 11:59:47 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 7pulp-infra@redhat.com
2018-07-02 19:18:47 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Comment 9pulp-infra@redhat.com
2018-07-10 14:08:19 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
Comment 10pulp-infra@redhat.com
2018-07-10 14:20:11 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.
Comment 11pulp-infra@redhat.com
2018-08-01 18:35:21 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 12pulp-infra@redhat.com
2018-08-03 18:03:37 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
I just went through this so here are the steps to reproduce.
On your Satellite box:
$ mkdir /myrepo
$ chmod -R 777 /myrepo
$ cd /myrepo
# wget some packages
$ createrepo -s sha1 /myrepo
Now create a repo and set the feed url to "file:///myrepo/" and the download policy to "On Demand" and sync it.
Now back on your Satellite box:
$ cd /myrepo
$ createrepo -s sha256 /myrepo
And now sync again. If it doesn't error, you are good. Also, confirm the # of packages.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2019:1222