Bug 1498123

Summary: [3.5] 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.5.1CC: aos-bugs, asolanas, bparees, dyan, erich, geliu, haowang, jokerman, mfojtik, mmccomas, mrobson, obulatov, pdwyer, qcai, rhowe
Target Milestone: ---   
Target Release: 3.5.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, 1498124, 1509362    
Bug Blocks:    

Comment 6 Dongbo Yan 2017-10-12 11:49:26 UTC
$ ./oc version
oc v3.5.5.31.34
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://:8443
openshift v3.5.5.31.34
kubernetes v1.5.2+43a9be4

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:f6e9d8c70d39ea5d80cd5109922421b0423325897623753afb6fa703a9fb5727

Deleting images from server ...
IMAGE
sha256:eb57752d19f50b7534856dde574efd5101b7f5e179afbf4d474caad3db24a989

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