Bug 1441028
Summary: | Can't prune the external image | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | zhou ying <yinzhou> |
Component: | Image Registry | Assignee: | Michal Minar <miminar> |
Status: | CLOSED ERRATA | QA Contact: | ge liu <geliu> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.5.0 | CC: | aos-bugs, haowang, mfojtik |
Target Milestone: | --- | ||
Target Release: | 3.7.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Image pruning algorithm used to consider only managed images for pruning.
Consequence: Mirrored blobs for not managed images could not be pruned. External images, could not be removed using pruning.
Fix: Pruning algorithm evaluates all the images, not just managed.
Result: External images and their blobs can now be pruned.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-11-28 21:53:29 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: |
Description
zhou ying
2017-04-11 03:17:49 UTC
There's an associated github issue: https://github.com/openshift/origin/issues/13700 Let's prune the external images as well. And here's a fix: https://github.com/openshift/origin/pull/13900 And the fix has been merged. I'm working on documentation now. Confirmed with latest origin, the issue has fixed : oadm version oadm v3.6.0-alpha.1+3b56da5-409 kubernetes v1.6.1+5115d708d7 openshift v3.6.0-alpha.1+3b56da5-409 kubernetes v1.6.1+5115d708d7 [root@ip-172-18-5-86 amd64]# oc get is myis -o yaml apiVersion: v1 ....... status: dockerImageRepository: 172.30.10.98:5000/zhouy/myis tags: - items: - created: 2017-05-05T01:30:16Z dockerImageReference: openshift/deployment-example@sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99 generation: 8 image: sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99 - created: 2017-05-05T01:29:17Z dockerImageReference: openshift/hello-openshift@sha256:bb21f3b2114a740a6c6322c8af0ec648174e6f2c800c8e09ec9f81f8ed209522 generation: 6 image: sha256:bb21f3b2114a740a6c6322c8af0ec648174e6f2c800c8e09ec9f81f8ed209522 - created: 2017-05-05T01:20:49Z dockerImageReference: docker.io/busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f generation: 2 image: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f tag: aaa - items: - created: 2017-05-05T01:25:41Z dockerImageReference: docker.io/busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f generation: 4 image: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f tag: bbb [root@ip-172-18-5-86 amd64]# oadm prune images --keep-tag-revisions=1 --keep-younger-than=0m Dry run enabled - no modifications will be made. Add --confirm to remove images Deleting references from image streams to images ... STREAM IMAGE TAGS zhouy/myis sha256:bb21f3b2114a740a6c6322c8af0ec648174e6f2c800c8e09ec9f81f8ed209522 aaa Deleting registry repository layer links ... REPO LAYER LINK zhouy/myis sha256:52ac0507e0fffc94cc56134026e68f994d693005f05f894f7b2dbce9033125a3 zhouy/myis sha256:2547625ce3bf125360c758c172dd2a01913c2314411d3425adf66f79bf405755 Deleting registry layer blobs ... BLOB sha256:52ac0507e0fffc94cc56134026e68f994d693005f05f894f7b2dbce9033125a3 sha256:2547625ce3bf125360c758c172dd2a01913c2314411d3425adf66f79bf405755 Deleting registry repository manifest data ... REPO IMAGE zhouy/myis sha256:bb21f3b2114a740a6c6322c8af0ec648174e6f2c800c8e09ec9f81f8ed209522 Deleting images from server ... IMAGE sha256:bb21f3b2114a740a6c6322c8af0ec648174e6f2c800c8e09ec9f81f8ed209522 Will verify this when merge to OCP3.6 Confirmed with the latest OCP, the issue has fixed: [root@zhouy testjson]# oadm version oadm v3.6.71 kubernetes v1.6.1+5115d708d7 openshift v3.6.69 kubernetes v1.6.1+5115d708d7 [root@zhouy testjson]# oadm prune images --keep-tag-revisions=1 --keep-younger-than=0m Dry run enabled - no modifications will be made. Add --confirm to remove images Deleting references from image streams to images ... STREAM IMAGE TAGS zhouy/myis sha256:936a332513e516c5954693b3be9d36919a14bc16fab6e28fa64d119d33ccb358 aaa Deleting registry repository layer links ... REPO LAYER LINK zhouy/myis sha256:fd606f36d3fcb891f48f0c5e5cd4d0af104f0613843b8a57de2229bf40e16bb4 zhouy/myis sha256:1161563e5af46bc2a75e9911d9cba0a3db5aa69d6da13fad975df9daf366cb60 Deleting registry layer blobs ... BLOB sha256:fd606f36d3fcb891f48f0c5e5cd4d0af104f0613843b8a57de2229bf40e16bb4 sha256:1161563e5af46bc2a75e9911d9cba0a3db5aa69d6da13fad975df9daf366cb60 Deleting registry repository manifest data ... REPO IMAGE zhouy/myis sha256:936a332513e516c5954693b3be9d36919a14bc16fab6e28fa64d119d33ccb358 Deleting images from server ... IMAGE sha256:936a332513e516c5954693b3be9d36919a14bc16fab6e28fa64d119d33ccb358 [root@zhouy testjson]# oc get is myis -o yaml ......... status: dockerImageRepository: 172.30.233.142:5000/zhouy/myis tags: - items: - created: 2017-05-09T09:47:00Z dockerImageReference: openshift/deployment-example@sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99 generation: 8 image: sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99 - created: 2017-05-09T09:45:42Z dockerImageReference: openshift/hello-openshift@sha256:936a332513e516c5954693b3be9d36919a14bc16fab6e28fa64d119d33ccb358 generation: 6 image: sha256:936a332513e516c5954693b3be9d36919a14bc16fab6e28fa64d119d33ccb358 - created: 2017-05-09T09:43:45Z dockerImageReference: docker.io/busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f generation: 2 image: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f tag: aaa - items: - created: 2017-05-09T09:44:37Z dockerImageReference: docker.io/busybox@sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f generation: 4 image: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f tag: bbb Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:3188 |