| Summary: | Can't prune image by command 'oadm prune images' with S3 as the bankend | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | zhou ying <yinzhou> |
| Component: | Image Registry | Assignee: | Michal Fojtik <mfojtik> |
| Status: | CLOSED NOTABUG | QA Contact: | Wei Sun <wsun> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.2.1 | CC: | aos-bugs, maszulik, mfojtik, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: |
undefined
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-12-19 10:16:11 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: | |
|
Description
zhou ying
2016-11-29 09:59:34 UTC
This looks like mis-configuration issue described in https://docs.openshift.org/latest/install_config/registry/registry_known_issues.html#known-issue-prune-fails-due-to-delete-disabled When storage:delete:enabled set to true, re-deploy the registry, and repeat image pruning operation, still met the 500 Internal Server Error:
[root@ip-172-18-13-143 origin]# oc get po
NAME READY STATUS RESTARTS AGE
docker-registry-5-snekh 1/1 Running 0 23m
router-1-6jmx1 1/1 Running 0 2h
[root@ip-172-18-13-143 origin]# oc env po docker-registry-5-snekh --list
# pods docker-registry-5-snekh, container registry
REGISTRY_HTTP_ADDR=:5000
REGISTRY_HTTP_NET=tcp
REGISTRY_HTTP_SECRET=KHPaYvLSbTrvtn2/e2U2EGaKvwlIe6dGKZgtylMN9BQ=
REGISTRY_CONFIGURATION_PATH=/etc/registry/config.yml
[root@ip-172-18-13-143 origin]# oc exec -it docker-registry-5-snekh more /etc/registry/config.yml
version: 0.1
log:
level: debug
http:
addr: :5000
storage:
delete:
enabled: true
redirect:
disable: false
cache:
layerinfo: inmemory
version: 0.1
log:
level: debug
http:
addr: :5000
storage:
cache:
layerinfo: inmemory
s3:
It looks lie your config has double values, you have two version, storage and other stanzas. This might cause the registry picking the 2nd version missing the storage:delete:enabled:true. Please fix the config an re-try. Maciej Szulik
Thank you! After updated the config, the prune has succeed, thanks.
[root@ip-172-18-12-100 origin]# oadm prune images --keep-younger-than=0 --confirm
Deleting registry layer blobs ...
BLOB
sha256:f432a3a34b9a276fa0f3dc030f3be9b7788f55f6b07bf7cde571fff8dc566832
sha256:3b31813c2cd47f24a2fb54316e88b79863ca305f6e5f33eaecde0b8405180aa6
sha256:8a0dc5f10b5005e3c125afff69192ba424ae71ccd1dd5c938a6f33b189deb003
sha256:08d48e6f1cff259389732d35307bb877215fa28867cdaff50c1dbd6e0b993c1f
sha256:91ec6240a2b5064f5941a7ca7959f597ffd80d2d4a997bad5e45ab8b88ca6984
sha256:b429eff5f252721885900f652c7d32c3cc1185cc8e3426ae4ca7cc6b4ad1a42e
sha256:14f9e16b6593712bc9907588cd47284ea850d0664f4aff5a852a3509386a272b
sha256:a7033a977215eb3b4f7b128c5bb9968870ff0c6f2f3e99922145c5897b00bbbf
sha256:e4e9658e120f74a7a0854025667bbbe23c2102401671df3a64aa0425f17e65b4
sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
Deleting images from server ...
IMAGE
sha256:ff860b45bd20ea91002c39901c02477e25804cbf5ac6cd23f0116780eff2e165
[root@ip-172-18-12-100 origin]# oc exec -it docker-registry-5-s6y1k more /etc/registry/config.yml
version: 0.1
log:
level: debug
http:
addr: :5000
storage:
delete:
enabled: true
redirect:
disable: false
cache:
layerinfo: inmemory
s3:
Double checking - can this be closed with notabug? Yup, closing. |