RPM1008: Checksum type "sha1" is not available for all units in the repository. Make sure those units have been downloaded
Environment
- Red Hat Satellite 6.3 or newer
Issue
-
Error while trying to synchronize the repository
Red Hat Enterprise Linux 7 Server - Optional RPMs 7.4:RPM1008: Checksum type "sha1" is not available for all units in the repository. Make sure those units have been downloaded.
Resolution
-
Solution 1: Change download policy of the repository to Immediate and sync the repository again:
- In WebUI, go to Content -> Products -> click to the appropriate product -> click to the problematic repository -> change "Download Policy" to "Immediate" and save it -> in top right corner, "Select action" -> "Sync Now".
-
Solution 2: If you would like the repository download policy to stay at "on demand" to save storage space then you can update the repository's configuration to use the checksum type of the repository metadata.
-
In WebUI, go to Content -> Products -> click to the appropriate product -> click to the problematic repository -> Copy the "Backend Identifier" of the repository.
-
SSH to the Satellite terminal as root user and then run "mongo" command to access the mongodb client console, then run:
use pulp_database db.repo_distributors.update({"repo_id" : "<REPLACE THIS WITH THE BACKEND IDENTIFIER THAT YOU JUST COPIED>", "distributor_type_id" : "yum_distributor"}, {$unset: {"config.checksum_type": ""}}) exit -
We will also need to update the Katello database so that the new checksum_type configuration can be propagated to all Capsule servers on next repository sync. In Satellite terminal, run "foreman-rake console" to access the application console then run:
# Works for Sat6.5 or newer repo = Katello::Repository.find_by_pulp_id("<REPLACE THIS WITH THE BACKEND IDENTIFIER THAT YOU JUST COPIED>") repo.saved_checksum_type = repo.pulp_scratchpad_checksum_type # Save the record. This must return 'true' repo.save! -
Sync the repository again.
-
Notice that you can hit Capsule sync failures with same error message, as a follow up of this issue (not of the remedy steps, but as another impact of the repo checksumtypes mismatch). If that happens, please follow this solution.
For more KB articles/solutions related to Red Hat Satellite 6.x Repository Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Repository Issues.
Root Cause
- This issue will happen when the following 2 conditions are met:
- The download policy of the repository is "on_demand"
- and the checksum type of the upstream repository (CDN) has changed or doesn't match the checksum type of the downstream repository.
- The underlying bugzilla tracking this problem is This content is not included.Bugzilla 1586336.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.