Bug 1290237
Summary: | [RFE] Delete Docker Images from private registry | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Eric Jones <erjones> |
Component: | RFE | Assignee: | Ben Parees <bparees> |
Status: | CLOSED WONTFIX | QA Contact: | Johnny Liu <jialiu> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.1.0 | CC: | acomabon, aos-bugs, bparees, dmoessne, erich, erjones, haowang, jokerman, mbarrett, misalunk, mmccomas, myllynen, nhashimo, pep, pweil |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-06-12 11:59:02 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1267746 |
Description
Eric Jones
2015-12-09 22:17:37 UTC
Hi Eric. Is this not doing what you need: https://docs.openshift.org/latest/admin_guide/pruning_resources.html#pruning-images Hi Paul, the only issue with that is it doesn't seem to leave any room for specifying what images to remove. It only suggests removing old images, not allowing certain images, and their later versions, to be completely removed from the registry. Please correct me if my understanding of this command is incorrect. Thanks, that makes sense. For now, if you want to remove specific images from the internal registry you should be able to log in to the registry and run the docker cli commands to do so. I think being able to specify which images to prune is reasonable. Paul, just to be certain, when you say login "and run the docker cli commands to do so" you mean using things like `docker rmi`? Has that been confirmed to work with the OpenShift internal Docker Registry? I thought that would only remove the images from the local download (i.e. the images you get when you run `docker pull`) not the ones that you have tagged and then pushed to your internal registry? The only way that I have found to delete images from a private registry is to use api calls that I haven't even been able to verify yet. An example of these can be found at http://www.mooshammer.us/blog/2014/12/24/basics-operation-on-a-private-docker-registry/ Eric, does a deletion of images in following way address your/customers issue? $ oc get images NAME DOCKER REF sha256:3515aebe23e2779fd10132a4e15ec15c654e3e7ed93170d58db00ae5e53713cf 172.30.230.44:5000/joe1/ose-haproxy-router@sha256:3515aebe23e2779fd10132a4e15ec15c654e3e7ed93170d58db00ae5e53713cf sha256:3cbc62aa1596f0dd9bc8da0acda0a5bb07397ae30ce92455890023bd1c22cd5d 172.30.230.44:5000/joe1/hello-openshift@sha256:3cbc62aa1596f0dd9bc8da0acda0a5bb07397ae30ce92455890023bd1c22cd5d sha256:4940bf54fe4f3237913f7eab399ae44a38ec544057fd687109163c123c982615 172.30.230.44:5000/joe1/secured@sha256:4940bf54fe4f3237913f7eab399ae44a38ec544057fd687109163c123c982615 # delete all images in joe1/hello-openshift $ oc get images | sed -n 's,.*joe1/hello-openshift@\(.*\),images/\1,p' | xargs oc delete # wait for registry's prune to remove any garbage I'm affraid those API calls are soft deletes only. The deleted manifests/layers/blobs will no longer be available for pulls but the content will be still stored on registry's storage. Michal, Thank you for that information on the api calls. Do you know how long it would take for the registry to remove any garbage? I am trying to test it in my environment, and it might simply be impatience, but I am not seeing any change yet. Just a summary on this: i've created a new trello card to reflect what i understand the RFE to be: ability to explicitly delete a specific image and have its registry blogs removed. Ie the equivalent of what oc prune does, but allowing you to specify exactly what image(s) to prune. This bug has been identified as a dated (created more than 3 months ago) bug. This bug has been triaged (has a trello card linked to it), or reviewed by Engineering/PM and has been put into the product backlog, however this bug has not been slated for a currently planned release (3.9, 3.10 or 3.11), which cover our releases for the rest of the calendar year. As a result of this bugs age, state on the current roadmap and PM Score (being below 70), this bug is being Closed - Differed, as it is currently not part of the products immediate priorities. Please see: https://docs.google.com/document/d/1zdqF4rB3ea8GmVIZ7qWCVYUaQ7-EexUrQEF0MTwdDkw/edit for more details. With the introduction of OpenShift 4, Red Hat has delivered or roadmapped a substantial number of features based on feedback by our customers. Many of the enhancements encompass specific RFEs which have been requested, or deliver a comparable solution to a customer problem, rendering an RFE redundant. This bz (RFE) has been identified as a feature request not yet planned or scheduled for an OpenShift release and is being closed. If this feature is still an active request that needs to be tracked, Red Hat Support can assist in filing a request in the new JIRA RFE system, as well as provide you with updates as the RFE progress within our planning processes. Please open a new support case: https://access.redhat.com/support/cases/#/case/new Opening a New Support Case: https://access.redhat.com/support/cases/#/case/new As the new Jira RFE system is not yet public, Red Hat Support can help answer your questions about your RFEs via the same support case system. |