Red Hat OpenShift Container Platform 4 : Image-Pruner is failing due to image reference format error

Solution Verified - Updated -

Issue

  • Automatic image pruning is failing in OpenShift ( OCP ) 4 with one of the following messages:

    W0819 00:01:40.360771 1 prune.go:577] Unable to parse DockerImageReference "badimage:tag #test.redhat.com:5000/test/containers/test:0.0.1" of Deployment[plugins/template]: invalid reference format - skipping
    W0819 00:01:40.373565 1 prune.go:577] Unable to parse DockerImageReference "badimage:tag #test.redhat.com:5000/test/containers/test:0.0.1" of ReplicaSet[plugins/template-76bbf6df64]: invalid reference format - skipping
    
    I0407 00:00:09.031647       1 prune.go:339] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
    Failed to build graph!
    
    The following objects have invalid references:
    
    replicaset/example-84f9495b5 namespace=example-test: container nginx: invalid image reference "registry.example.com:8082/example/example-nginx/": invalid reference format
    
    Either fix the references or delete the objects to make the pruner proceed.
    error: failed to build graph - no changes made
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.5
    • 4.6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content