Project

Profile

Help

Issue #3736

closed

When the checksum type of the upstream repository changed, syncing a "on_demand" repository will fail

Added by hyu over 6 years ago. Updated over 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.16.4
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 39
Quarter:

Description

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.

[1] https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/distributors/yum/configuration.py#L345

Also available in: Atom PDF