As an administrator, I'd like the ability to easily delete content from pulp
Ticket moved to GitHub: "pulp/pulpcore/2044":https://github.com/pulp/pulpcore/issues/2044
Using RPM as an example.
Currently if there is a "bad" rpm, that we want to remove from pulp, to ensure their is no ability for it to be republished, it's far from straight forward.
Current process, I believe is.
- Identify content to be removed.
- Locate content in each version of each repository.
- Delete content from each version of each repository.
- Update publications, and distributions where appropriate.
- Run delete orphaned data.
It would be great if there was a simple "do it" button that I can metaphorically click, but I doubt that's realistic.
I think what may be more realistic is, some way of finding out which repositories/versions of a repository has the content and providing a report, that could then be used to feed into some one's internal machinery to delete/publish/update distributors and finally clean up orphaned content.
I had a quick look but couldn't find a pre-existing request for this feature.
Updated by gerrod about 1 year ago
The best we have for finding which repository versions content is in is the repository version list endpoint with content field filter: https://docs.pulpproject.org/pulp_rpm/restapi.html#operation/repositories_rpm_rpm_versions_list. You would have to call that for every repository you think contains the content you want to remove. Then you would have to delete every repository version the content was present in before it'll become an orphan. Still, having an endpoint return what repositories & versions content is in would be nice.
What might be of more interest instead of deleting content would be having a better repair process for bad content. Two issues of note: process for fixing broken artifacts: https://pulp.plan.io/issues/7791, process for repairing plugin specific content: https://pulp.plan.io/issues/9128. We haven't found time to work on these, but maybe you can look through them and comment if they would be useful.