Project

Profile

Help

Story #2813

closed

As a user, I can delete already downloaded files for a particular repo(s) in case of on_demand policy

Added by ttereshc almost 7 years ago. Updated over 4 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

There is a desire to be able to reduce disk space by deleting files of the units associated with a particular repository (or a set of repositories) if files aren't actually needed. Those files can be downloaded again at the next request.

Several points to take into consideration:

  1. File(s) of a content unit shouldn't be deleted if there is at least one repository with immediate policy which the content unit is associated with.
  2. Content unit should be marked back as non-downloaded one. Mark as it is not downloaded first and only then actually delete files to avoid the race condition when unit is marked as downloaded but files are no longer on a disk.
  3. Since only one copy of the file(s) for a particular content unit is stored on a disk, they will be deleted for all the repositories which the content unit is associated with.
  4. Even if a resource reservation is used for a repo of interest, multiple repos may be affected (see previous point ^). This may lead to a race condition:
    - between this deletion task and a sync of the other repo which just switched from on_demand to immediate policy for In this case at least one unit may be deleted for a repo with immediate policy when it should not be.
    - between this deletion task and periodical download_deferred task which downloads recently requested files.
    - more?
  5. A greedy use case to consider: delete all files for all on_demand repositories in Pulp.

Also available in: Atom PDF