Issue #2177
closeddownload_repo task fails to mark some units as downloaded
Description
If you run the download_repo task with the "verify_all_units" option, for any unit where all of the files are already present on disk and pass validation, the task will not set the unit's "downloaded" attribute to True.
1. create a repo with download policy of immediate
2. sync the repo
3. drop the database and re-run pulp-manage-db
4. re-create the repo with download policy of on_demand
5. sync the repo
6. run the download_repo task with "verify_all_units" set to True
You can then observe that the units are all present in the DB and on the filesystem, and they are associated with the repo, but their "downloaded" attributes in the DB are all False.
The solution is likely to separate this block into its own function:
and then also call it from here:
https://github.com/pulp/pulp/blob/pulp-2.8.6-1/server/pulp/server/controllers/repository.py#L1433
Related issues
Updated by mhrivnak about 8 years ago
- Related to Story #236: Don't re-download rpms if they exist on disk added
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.