Story #8313
closedAs an admin I have a way to delete repo versions from push repo so I can free some disk space
100%
Description
Problem statement¶
- 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.
- 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¶
- 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
- 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)
- 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
Updated by ttereshc almost 4 years 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.
Updated by mdellweg almost 4 years 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.
Updated by ipanova@redhat.com over 3 years 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
Updated by ipanova@redhat.com over 3 years 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.
Updated by ipanova@redhat.com over 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
- Sprint/Milestone set to 2.6.0
Updated by pulpbot over 3 years ago
- Status changed from ASSIGNED to POST
Updated by ipanova@redhat.com over 3 years ago
- Sprint/Milestone changed from 2.6.0 to 2.7.0
Added by ipanova@redhat.com over 3 years ago
Added by ipanova@redhat.com over 3 years ago
Revision 0fe5d393 | View on GitHub
Added PUT/PATCH method to the container-push repository.
closes #8313
Required PR: https://github.com/pulp/pulpcore/pull/1378
Updated by ipanova@redhat.com over 3 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 0fe5d39336c53d3529af3e6930194550c24bbb0e.
Updated by pulpbot over 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Added PUT/PATCH method to the container-push repository.
closes #8313
Required PR: https://github.com/pulp/pulpcore/pull/1378