Bug 1577356 - [3.7] oadm prune images fails on invalid image reference
Summary: [3.7] oadm prune images fails on invalid image reference
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.7.z
Assignee: Alexey Gladkov
QA Contact: Dongbo Yan
URL:
Whiteboard:
Depends On: 1518817
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-11 19:08 UTC by Ben Parees
Modified: 2021-06-10 16:09 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1518817
Environment:
Last Closed: 2018-06-07 08:40:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1798 0 None None None 2018-06-07 08:41:31 UTC

Comment 7 Dongbo Yan 2018-05-28 11:08:20 UTC
Verified
openshift v3.7.51
kubernetes v1.7.6+a08f5eeb62
etcd 3.2.8

Reproduce steps:
1. Edit dc with invalid image reference in 'image' field like below:
        image: docker-registry.default.svc:5000/dyan/cakephp-mysql-example@sha256:latest

2. Prune images
 $ oc adm prune images --keep-tag-revisions=0 --keep-younger-than=0 --token=jf9HRi58RqN0GqBerRyn9UHXHxAvQImhlr6tJ5RhDYE --confirm --loglevel=4

Failed to build graph!

The following objects have invalid references:

  Pod[dyan/cakephp-mysql-example-6-hook-pre]: invalid docker image reference "docker-registry.default.svc:5000/dyan/cakephp-mysql-example@sha256:latest": invalid reference format
  ReplicationController[dyan/cakephp-mysql-example-6]: invalid docker image reference "docker-registry.default.svc:5000/dyan/cakephp-mysql-example@sha256:latest": invalid reference format
  DeploymentConfig[dyan/cakephp-mysql-example]: invalid docker image reference "docker-registry.default.svc:5000/dyan/cakephp-mysql-example@sha256:latest": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
F0516 03:40:11.697121    1269 helpers.go:119] error: failed to build graph - no changes made

3. Prune images with option '--ignore-invalid-refs'
could prune images without errors

Comment 9 errata-xmlrpc 2018-06-07 08:40:56 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:1798


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