Bug 1467340 - [Registry][Pruning] Orphaned blobs cannot be pruned
Summary: [Registry][Pruning] Orphaned blobs cannot be pruned
Keywords:
Status: CLOSED DUPLICATE of bug 1479340
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.6.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 3.7.0
Assignee: Michal Minar
QA Contact: ge liu
URL:
Whiteboard:
Depends On: 1408676 1499314 1499315
Blocks: 1471844 1472438
TreeView+ depends on / blocked
 
Reported: 2017-07-03 12:48 UTC by Michal Minar
Modified: 2023-09-15 00:02 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1408676
: 1471844 1472438 (view as bug list)
Environment:
Last Closed: 2017-08-23 14:32:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 3 ge liu 2017-07-04 06:36:22 UTC
Verified this bug with fork ami:

Version: 
openshift v1.5.0-alpha.2+c85f23e-2428
kubernetes v1.6.1+5115d708d7
etcd 3.1.0

1. add system:image-pruner role to user:
 oadm policy add-cluster-role-to-user system:image-pruner geliu

2. Run `oc adm prune images` in a loop 
 # while true; do oc adm prune images --keep-younger-than=0s --confirm; done

3. Open another terminate window and oc new-project lgp1
4. oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
5. oc scale dc ruby-ex --replicas=0
6. Wait for build to complete

7. back to first terminate window to check the step 2, there is not any images blob be deleted

8. # docker pull 172.30.21.234:5000/lgp1/ruby-ex:latest successfully
9. oc delete project lgp1

10. back to first terminate window to check the step 2, there are blob data be deleted

# while true; do oc adm prune images --keep-younger-than=0s --confirm; done
 
Deleting registry layer blobs ...
BLOB
sha256:3254209b5b32595a24fdfe44bd52b373979cc5641e4cf3d56b51811e5a6895e0
.....................

Comment 11 Brenton Leanhardt 2017-08-23 14:32:53 UTC

*** This bug has been marked as a duplicate of bug 1479340 ***

Comment 12 Brenton Leanhardt 2017-08-23 14:36:52 UTC
Just fyi, the reason this bug targeting 3.7 was labeled a duplicate is simply because the code is already upstream in Origin which is where 3.7 is being developed.

Comment 13 Red Hat Bugzilla 2023-09-15 00:02:54 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


Note You need to log in before you can comment on or make changes to this bug.