Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1577356 - [3.7] oadm prune images fails on invalid image reference
[3.7] oadm prune images fails on invalid image reference
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry (Show other bugs)
3.7.0
Unspecified Unspecified
unspecified Severity medium
: ---
: 3.7.z
Assigned To: Alexey Gladkov
Dongbo Yan
: OpsBlocker
Depends On: 1518817
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-11 15:08 EDT by Ben Parees
Modified: 2018-06-07 04:41 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1518817
Environment:
Last Closed: 2018-06-07 04:40:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1798 None None None 2018-06-07 04:41 EDT

  None (edit)
Comment 7 Dongbo Yan 2018-05-28 07:08:20 EDT
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 04:40:56 EDT
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.