Bug 1509362 - [3.4] Prune Deleted Layer of a Valid Image due to minimum aging
Summary: [3.4] Prune Deleted Layer of a Valid Image due to minimum aging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.4.1
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: 3.4.z
Assignee: Michal Minar
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On: 1487408
Blocks: 1498123 1498124
TreeView+ depends on / blocked
 
Reported: 2017-11-03 15:46 UTC by Ben Parees
Modified: 2021-09-09 12:48 UTC (History)
16 users (show)

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.
Clone Of: 1487408
Environment:
Last Closed: 2018-04-18 07:00:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3242401 0 None None None 2017-11-15 18:58:38 UTC
Red Hat Product Errata RHBA-2018:1134 0 None None None 2018-04-18 07:02:00 UTC

Comment 1 Michal Minar 2017-11-06 15:50:41 UTC
PR: https://github.com/openshift/ose/pull/924

Comment 2 Michal Minar 2017-11-06 18:14:02 UTC
Merged.

Comment 3 Dongbo Yan 2017-11-10 06:38:01 UTC
Verified
$ ./oc version
oc v3.4.1.44.37
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://8443
openshift v3.4.1.44.37
kubernetes v1.4.0+776c994

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

Deleting registry layer blobs ...
BLOB
sha256:aea8745b76ae0c80e3ce9474a49cb33194ed5aaadb0228eb8eb468bed9fbb871

Deleting images from server ...
IMAGE
sha256:6b022de1e813246e316de3abbd9e9562908eaa42f7dffce7e74a85e53024cde4

Actual result:the new image is not pruned

could move to verified

Comment 6 errata-xmlrpc 2018-04-18 07:00:36 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-2018:1134


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