Uploading ISOs of same name to a repo creates duplicates, makes repo unusable
Uploading an ISO file into a repo which already contains an ISO of the same name, but with different content, will cause the repo to end up with multiple units of the same name. This breaks the repo, as PULP_MANIFEST will contain two entries for the same file, making the repo unable to be synced by another Pulp instance.
Steps to reproduce¶
In dev env:
# Make an ISO repo $ pulp-admin -u admin -p admin iso repo create --repo-id zoo-iso # Upload a file $ echo hamburger > food $ pulp-admin -u admin -p admin iso repo uploads upload --repo-id zoo-iso -f food # Upload another file of same name $ echo pizza > food $ pulp-admin -u admin -p admin iso repo uploads upload --repo-id zoo-iso -f food # Publish it $ pulp-admin -u admin -p admin iso repo publish run --repo-id zoo-iso # Check generated PULP_MANIFEST $ curl -k https://localhost/pulp/isos/zoo-iso/PULP_MANIFEST food,8cec6a9cb8cb1941243b138e50ab8e2dd1da2a380dd2c7c63928003f82173d9b,10 food,fff8acd78f7528c143cb5a6971f911d3869368cbc177f3f4404d945c6accc08d,6
- Repo contains two ISO units named "food"
- PULP_MANIFEST contains two entries named "food"
- Pulp can't sync from the published repo.
- Repo contains one ISO unit named "food" with checksum fff8acd7... (the second uploaded file)
- PULP_MANIFEST contains one entry named "food"
- Pulp can sync from the published repo.
Might be a regression from Pulp ~2.8 but I'm not sure.
Seems almost a duplicate of https://pulp.plan.io/issues/3047, but I only see sync being tested there, even though issue description mentions uploads.
Tested with pulp_rpm 0f5b2e7c.