Bug 1807363

Summary: Image Pruner can fail if image registry is Removed
Product: OpenShift Container Platform Reporter: Wenjing Zheng <wzheng>
Component: ImageStreamsAssignee: Corey Daley <cdaley>
Status: CLOSED DUPLICATE QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: adam.kaplan, aos-bugs, jokerman, wzheng
Target Milestone: ---Keywords: Reopened
Target Release: 4.4.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-04-01 14:20:39 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:

Description Wenjing Zheng 2020-02-26 07:55:04 UTC
This bug was initially created as a copy of Bug #1806019

I am copying this bug because: 



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 1 Wenjing Zheng 2020-02-26 08:12:59 UTC

*** This bug has been marked as a duplicate of bug 1806687 ***

Comment 2 Wenjing Zheng 2020-03-26 04:51:32 UTC
This is for 4.5: https://bugzilla.redhat.com/show_bug.cgi?id=1806019

Comment 3 Wenjing Zheng 2020-03-26 05:59:32 UTC
For the 4.5 fix, there is one warning for image pruner when image registry is removed(https://bugzilla.redhat.com/show_bug.cgi?id=1806019#c3):
$ oc logs pods/image-pruner-1583834340-ln8wn
Only API objects will be removed.  No modifications to the image registry will be made.

Although for 4.4 image pruner no fail after image registry is removed.

Comment 4 Corey Daley 2020-03-26 14:22:10 UTC
If the image registry is marked as "Removed", the --prune-registry flag is removed, so this is the correct behavior.

Comment 5 Adam Kaplan 2020-04-01 14:20:39 UTC

*** This bug has been marked as a duplicate of bug 1806687 ***