Project

Profile

Help

Story #8313

As an admin I have a way to delete repo versions from push repo so I can free some disk space

Added by ipanova@redhat.com 8 months ago. Updated 4 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
GalaxyNG
Sprint:
Sprint 99
Quarter:

Description

Problem statement

  1. There is no way to free some disc space because we do not allow repo versions removal from push repos. Deleting entire repo is not a viable option.
  2. There is no way to delete certain repo versions if there is no longer need to keep them.

(Note: Orphan clean up is still expected to be run in order to remove artifacts from the fs.)

Solution

  1. Enable DELETE on the push repo versions endpoint and allow removal of any versions except the latest one.
    • might bring complexity in the logic. Add validation on the distribution update call to disallow repo_version update
    • change in access policy
  2. After each push operation remove all repo versions except the latest one. As a result each push operation will always result into one version.
    • this approach will close forever the door for us for adding 'rollback' capabilities for push repos
    • this behaviour might be considered as unwanted/confusing. Other operations like tag/untag/manifest removal will still produce a new version and will not clean up previous ones ( behaviour discrepancy)
  3. Leave this to pulpcore which will introduce retain N repo-version option. For pulp container push repos by default there will retained only 1 version https://pulp.plan.io/issues/8368

Associated revisions

Revision 0fe5d393 View on GitHub
Added by ipanova@redhat.com 4 months ago

Added PUT/PATCH method to the container-push repository.

closes #8313

Required PR: https://github.com/pulp/pulpcore/pull/1378

Revision 0fe5d393 View on GitHub
Added by ipanova@redhat.com 4 months ago

Added PUT/PATCH method to the container-push repository.

closes #8313

Required PR: https://github.com/pulp/pulpcore/pull/1378

History

#1 Updated by ipanova@redhat.com 8 months ago

  • Description updated (diff)

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

  • Description updated (diff)

#3 Updated by ttereshc 8 months ago

  • Description updated (diff)

I think I'm in favour of solution #1, to allow deleting repo versions and not removing all old ones automatically.
I'm not sure whether we need validation in distribution or not.

Historically, Pulp chose the path of providing a lot of flexibility and thus requiring users to understand more concepts and details if they want fine control.
Higher level tools/projects (Katello, Galaxy NG, our CLI) can make it simpler for user and remove only allowed/labelled versions or remove all old ones.

#4 Updated by ipanova@redhat.com 8 months ago

  • Tags GalaxyNG added

#5 Updated by ipanova@redhat.com 8 months ago

  • Sprint/Milestone set to 2.5.0

#6 Updated by mdellweg 8 months ago

I believe, this story would be solved by

https://pulp.plan.io/issues/8368

and setting the default for push repos to retain 1 version.

#7 Updated by ipanova@redhat.com 8 months ago

  • Description updated (diff)

#8 Updated by ipanova@redhat.com 7 months ago

  • Sprint/Milestone deleted (2.5.0)

#9 Updated by ipanova@redhat.com 6 months ago

mdellweg wrote:

I believe, this story would be solved by

https://pulp.plan.io/issues/8368

and setting the default for push repos to retain 1 version.

POST/PUT is disabled for push repos. Some users might want to change the default which would not be possible

#10 Updated by ipanova@redhat.com 5 months ago

To move this forward I suggest going with option3 which will require to add to the current viewset also put/patch. It will also require to add serializer validation so remote cannot be associated.

#11 Updated by ipanova@redhat.com 5 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
  • Sprint/Milestone set to 2.6.0

#12 Updated by ipanova@redhat.com 5 months ago

  • Sprint set to Sprint 97

#13 Updated by pulpbot 5 months ago

  • Status changed from ASSIGNED to POST

#14 Updated by ipanova@redhat.com 5 months ago

  • Sprint/Milestone changed from 2.6.0 to 2.7.0

#15 Updated by rchan 5 months ago

  • Sprint changed from Sprint 97 to Sprint 98

#16 Updated by rchan 4 months ago

  • Sprint changed from Sprint 98 to Sprint 99

#17 Updated by ipanova@redhat.com 4 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#18 Updated by pulpbot 4 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF