Issue #5448
closedIf multiple source repos contain the same package, it can be chosen at random
Description
When copying units using the "additional_repos" feature, if two source repos contain the same package, the package will be chosen nondeterministically from one of the two repos, and therefore the target repo that the dependency ends up in can be nondeterministic.
Concrete example:
Repo 1 contains "whale" and "walrus" RPMs
Repo 2 contains "whale", "shark" and "stork" RPMs
Dependencies:
walrus
└── whale
├── shark
└── stork
curl -k -u admin:admin --cert ~/.pulp/user-cert.pem -d '{"source_repo_id":"repo1","criteria":{"type_ids":["modulemd"],"filters":{}},"override_config":{"recursive_conservative":true,"additional_repos":{"repo2": "repo4"}}}' -H "Content-Type: application/json" -X POST https://localhost/pulp/api/v2/repositories/repo3/actions/associate/
After performing the above request, sometimes the "whale" RPM will be correctly copied from repo1 and correctly end up in repo3, and sometimes it will incorrectly be copied from repo2 and incorrectly end up in repo4
Libsolv has a "repo priority" feature that can be used to remedy this. The repos can assigned descending priority levels.
Related issues
Updated by dalley about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
This was deemed not a pressing issue given the status of Pulp 2 and the need to prioritize Pulp 3, but we can reopen it if necessary.
Updated by kersom about 5 years ago
- Related to Test #5242: Test copy using "additional_repos" to provide multiple source/destination repos via override added