When the checksum type of the upstream repository changed, syncing a "on_demand" repository will fail
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  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.
No longer automatically update the checksum_type on distributors
We were exposing checksum_type via the distributor config which required automatically setting it. However, we began exposing the repo scratchpad (which contains the repo's checksum type) in #1172. Setting the distributor checksum_type automatically causes problems for on-demand repos when the checksum type changes upstream. Therefore, stop automatically setting it.
fixes #3736 https://pulp.plan.io/issues/3736