Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.
Issue #8722
closedThe checksum type from a remote source is not used by for a publication
Description
To reproduce:
- create are repo with default parameters
- create a remote with url https://fixtures.pulpproject.org/rpm-with-md5/ and on_demand policy
- sync
- create a publication for the repo, do not specify any options, defaults need to be used
Observe that metadata uses sha256 checksum type.
This affects Pulp 3 -> Pulp 2 sync (aka smart proxy use case), because Pulp 2 is looking at the metadata checksum (sha256 in our case) and uses it for everything, including content. But in case of on_demand sync only md5 is available in the reproducer example.
Updated by ttereshc over 3 years ago
I think the root cause of the issue is the evolution of the checksum type feature.
First, only sha256 was used and it was treated as a default for publications.
Then Pulp started accepting a one-time option at publication time to have a custom checksum type.
Then Pulp started to consider the original checksum type which comes from the remote source, and the precedence was: one-time option at publish time, original checksum type, default value.
Then the configuration of checksum type became available on the repository model, and it has a default value, which is currently has higher precedence than the original checksum type. I think it is not an intentional behaviour.
I suggest to remove a default for the repository configuration and allow it to be not configured.
Updated by ipanova@redhat.com over 3 years ago
ttereshc wrote:
I think the root cause of the issue is the evolution of the checksum type feature.
First, only sha256 was used and it was treated as a default for publications.
Then Pulp started accepting a one-time option at publication time to have a custom checksum type.
Then Pulp started to consider the original checksum type which comes from the remote source, and the precedence was: one-time option at publish time, original checksum type, default value.
Then the configuration of checksum type became available on the repository model, and it has a default value, which is currently has higher precedence than the original checksum type. I think it is not an intentional behaviour.I suggest to remove a default for the repository configuration and allow it to be not configured.
Docs also should be updated https://docs.pulpproject.org/pulp_rpm/workflows/create_sync_publish.html#create-a-publication
Updated by dalley over 3 years ago
Then the configuration of checksum type became available on the repository model, and it has a default value, which is currently has higher precedence than the original checksum type. I think it is not an intentional behaviour.
Agreed.
Updated by pulpbot over 3 years ago
- Status changed from NEW to POST
Updated by ttereshc over 3 years ago
- Assignee set to dalley
- Sprint set to Sprint 98
Added by dalley over 3 years ago
Updated by dalley over 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset 37bdbfb7a480c5336b656d1416079b78ea52d364.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Allow checksum types to be unspecified for publish
Intelligently decide which checksum types to use if the user left them unspecified.
closes: #8722 https://pulp.plan.io/issues/8722