Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1806019

Summary: Image Pruner can fail if image registry is Removed
Product: OpenShift Container Platform Reporter: Adam Kaplan <adam.kaplan>
Component: Image RegistryAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-04 18:01:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Kaplan 2020-02-21 20:12:39 UTC
Description of problem:

If the automatic image pruner is enabled and the image registry itself is `Removed`, the image pruning jobs can fail.


Version-Release number of selected component (if applicable): 4.4.0


How reproducible: Always


Steps to Reproduce:
1. Create an image pruner CRD
2. Mark the internal registry as `Removed`
3. Run the image pruner

Actual results:

Image pruner jobs fail trying to prune images from the non-existent registry.


Expected results:

Image pruner jobs only prune image metadata in etcd.

Additional info:

Comment 3 Wenjing Zheng 2020-03-10 10:04:16 UTC
Verified on 4.5.0-0.nightly-2020-03-06-190457:
zhengwenjings-MacBook-Pro:4.5 wzheng$ oc logs pods/image-pruner-1583834340-ln8wn
Only API objects will be removed.  No modifications to the image registry will be made.
Deleting istags wewang1/ruby-25-rhel7: latest
Deleting istags wewang1/ruby: latest
Deleted 2 objects.
zhengwenjings-MacBook-Pro:4.5 wzheng$ oc get pods
NAME                                               READY   STATUS      RESTARTS   AGE
cluster-image-registry-operator-85f5f69dbc-lggmw   2/2     Running     0          32h
image-pruner-1583834340-ln8wn                      0/1     Completed   0          2m22s
image-pruner-1583834400-56mgl                      0/1     Completed   0          82s
image-pruner-1583834460-jx7tt                      0/1     Completed   0          22s
node-ca-8qk28                                      1/1     Running     0          32h
node-ca-drvh8                                      1/1     Running     0          32h
node-ca-k77rk                                      1/1     Running     0          3h24m
node-ca-v2v9m                                      1/1     Running     0          32h
node-ca-z4vb6                                      1/1     Running     0          3h21m
node-ca-zwjk8                                      1/1     Running     0          32h

Comment 5 errata-xmlrpc 2020-08-04 18:01:28 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 (OpenShift Container Platform 4.5 image release 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-2020:2409