Bug 1498124

Summary: [3.6] Prune Deleted Layer of a Valid Image due to minimum aging
Product: OpenShift Container Platform Reporter: Ben Parees <bparees>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED ERRATA QA Contact: Dongbo Yan <dyan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: aos-bugs, bparees, dyan, erich, geliu, haowang, jokerman, mfojtik, mmccomas, mrobson, obulatov, pdwyer, qcai, rhowe
Target Milestone: ---   
Target Release: 3.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: images younger than the threshold are not added to the dependency graph. Consequence: a blob which is used by a young image and by a prunable image is deleted because it has no references in the graph. Fix: add young images to the graph and mark them as non-prunable. Result: the blob has references and is not deleted.
Story Points: ---
Clone Of: 1487408 Environment:
Last Closed: 2017-10-25 13:08: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: 1487408, 1509362    
Bug Blocks: 1498123    

Comment 3 Dongbo Yan 2017-10-13 08:03:46 UTC
wait for available puddle

Comment 6 Dongbo Yan 2017-10-17 05:45:16 UTC
Verified
$ ./oc version
oc v3.6.173.0.49
kubernetes v1.6.1+5115d708d7
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://:8443
openshift v3.6.173.0.49
kubernetes v1.6.1+5115d708d7

push two images reference the same image layer, one is pushed more 10min. Prune the old image via cmd
# oadm prune images --certificate-authority=ca.crt --keep-younger-than=10m --registry-url=docker-registry-default.com --confirm

Deleting registry layer blobs ...
BLOB
sha256:738f6e7aa7ede099687a772a73a6b9799e697e55c4d82baa97738bbb1e20e0c3
sha256:3cf6e1c0e04c09e1fe810f0eaeecc8c450a4618f159dd7eb70c6a17c5fb4561b

Deleting images from server ...
IMAGE
sha256:e589ee56651301057afce5f99651e32ec30a3d79d641999491b79979d59177e6

Actual result:the new image is not pruned

move to verified

Comment 8 errata-xmlrpc 2017-10-25 13:08:02 UTC
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/RHBA-2017:3049