Project

Profile

Help

Story #8459

As a user I want to reclaim disk space for a list of repositories

Added by ipanova@redhat.com about 2 months ago. Updated 11 days ago.

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

0%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
GalaxyNG, Katello
Sprint:
Quarter:

Description

Problem Statement/Use cases:

  • As a user I might have content that I no longer need to serve but I want to keep it in the repo for history purposes. I want to still be able to free up some disk space in such case.
  • As a user I have repos that have on_demand download policy and I want to clear out downloaded files for those repos. A repository with on_demand download policy will store artifacts locally after they have been requested, but there really isn't a way to have pulp delete the locally stored files and free disk space if these packages are unlikely to be used again.

Solution

pulp/api/v3/repositories/<reclaim-disk-space>/ Provide a separate endpoint which will accept a list of repo hrefs to reclaim disk space for.

  • Artifacts only exclusively to that list of repos will be removed. No new versions will be created or removed because content set will not change.
  • a keeplist option will contain list of repo_version hrefs which will be excluded from Artifact removal.
  • The task will only remove those Artifacts that have a corresponding Remote artifact.
  • There, however, will be a force flag that will remove Artifacts that have no RA( aka uploaded content). This will not be a default behavior.
  • The task will trim Artifacts regardless of the download policy. ( Content app would be able to stream artifact if it is locally available otherwise with the help of RA( if available) it would download artifact from the remote source)

History

#1 Updated by ipanova@redhat.com about 2 months ago

  • Description updated (diff)

#2 Updated by ipanova@redhat.com about 2 months ago

  • Description updated (diff)

#4 Updated by ttereshc 26 days ago

I suggest to change the language from deferred download policy to on_demand download policy.

Other than that it looks good and +1 to keeplist or some kind of labeling to preserve repo versions of interest. If a user would want to reclaim disc space on a regular basis, it might not be convenient to provide the keeplist each time, so maybe labeling repo versions in some way would be a better approach.

#5 Updated by mdellweg 26 days ago

This is kind of the anti-feature of the repoversion-repair. Maybe it's wise to try to give them similar apis. I think that would mean the atom to work on would not be the repository, but the repository_version. You'd probably need to pass a list of versions to get a meaningful feature here. But it would give you the keep_list functionality for free (Just don't specify the ones to preserve).

#6 Updated by ipanova@redhat.com 26 days ago

ttereshc wrote:

I suggest to change the language from deferred download policy to on_demand download policy.

Other than that it looks good and +1 to keeplist or some kind of labeling to preserve repo versions of interest. If a user would want to reclaim disc space on a regular basis, it might not be convenient to provide the keeplist each time, so maybe labeling repo versions in some way would be a better approach.

To my knowledge labeling is available only on the repos and not repo versions. I agree that labels are more user friendly

#7 Updated by ipanova@redhat.com 26 days ago

  • Description updated (diff)

#8 Updated by ipanova@redhat.com 19 days ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#9 Updated by newswangerd 18 days ago

Will there be some other mechanism to do this, but for a specific set of content in a repository? We'd also like to be able to clean up a list of content in a repository without completely wiping out all content in previous versions of a repo.

#10 Updated by newswangerd 17 days ago

I guess we can accomplish this by removing the content from the latest version of the repo and then run the task to purge content on all versions except the latest.

#11 Updated by ipanova@redhat.com 11 days ago

  • Tags GalaxyNG added

#12 Updated by ipanova@redhat.com 11 days ago

  • Tags Katello added

Please register to edit this issue

Also available in: Atom PDF