Project

Profile

Help

Issue #2177

closed

download_repo task fails to mark some units as downloaded

Added by mhrivnak over 8 years ago. Updated over 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.7
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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:

https://github.com/pulp/pulp/blob/pulp-2.8.6-1/server/pulp/server/controllers/repository.py#L1485-L1491

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

Related to RPM Support - Story #236: Don't re-download rpms if they exist on diskCLOSED - CURRENTRELEASEmhrivnak

Actions

Also available in: Atom PDF