Project

Profile

Help

Story #2813

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

Added by ttereshc over 2 years ago. Updated 8 months ago.

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

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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.

History

#1 Updated by pcreech over 2 years ago

  • Groomed changed from No to Yes

#2 Updated by bmbouter over 2 years ago

There is still a separate race condition for a single repo. Maybe this is one of the race conditions described in the ticket, but those seemed to focus on multi-repo race conditions.

1. The user says to delete the content in a specific repo, say foo
2. The unit abc is marked as non-downloaded one
3. A client machine requests unit abc which causes the download to be marked as downloaded again <----- this is the race part
4. Unit abc's files are deleted

This would leave the unit abc in the 'downloaded' state, yet it's deleted from disk.

I think before starting this story the race conditions need to be written out more fully. They are kind of written out, but kind of vague. Also, how will these race conditions be solved? I believe planning how to address each race condition ahead of time would be better than hoping the implementer addresses all race conditions perfectly.

#5 Updated by bmbouter 8 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF