Bug 2051692

Summary: co/image-registry is degrade because ImagePrunerDegraded: Job has reached the specified backoff limit
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED ERRATA QA Contact: XiuJuan Wang <xiuwang>
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aos-bugs, dgoodwin, dofinn, imatza, otuchfel, skuznets, travi, vyoganan, wking, xiuwang
Target Milestone: ---Keywords: ServiceDeliveryImpact
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: the image pruner job didn't retry on failures. Consequence: a single failure could make the image registry operator degraded until next run of the pruner. Fix: the job makes few more attempts if the pruner fails. Result: temporary problems with the pruner doesn't make the image registry operator degraded.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:43:22 UTC Type: ---
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: 1990125    
Bug Blocks: 2059606    

Comment 2 XiuJuan Wang 2022-02-08 13:14:07 UTC
Since the api timeout is hard to reproduce, I choose to set ignoreInvalidImageReferences:false to test on 4.10.0-0.nightly-2022-02-08-071248 cluster,

1.set 
      ignoreInvalidImageReferences:false
      schedule: '* * * * *'
2. Create a pod with invalid image name
3.Check the imagepruner pod, it will retry 5 times

 oc logs -f image-pruner-27405425-28886
I0208 13:05:03.810103       7 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made
attempt #1 has failed (exit code 1), going to make another attempt...
I0208 13:05:34.540589      16 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made
attempt #2 has failed (exit code 1), going to make another attempt...
I0208 13:06:35.232914      25 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made
attempt #3 has failed (exit code 1), going to make another attempt...
I0208 13:08:05.993120      34 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made
attempt #4 has failed (exit code 1), going to make another attempt...
I0208 13:10:06.650628      43 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made
attempt #5 has failed (exit code 1), going to make another attempt...
I0208 13:12:37.318843      52 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Failed to build graph!

The following objects have invalid references:

  pod/prune1 namespace=wxj: container prune1: invalid image reference "quay.io/openshifttest/hello-pod@sha:123": invalid reference format

Either fix the references or delete the objects to make the pruner proceed.
error: failed to build graph - no changes made

Comment 5 errata-xmlrpc 2022-03-10 16:43:22 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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/RHSA-2022:0056