Bug 1867792

Summary: Pruner degrades image registry operator if the latter is removed
Product: OpenShift Container Platform Reporter: Ricardo Maraschini <rmarasch>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.5CC: ansverma, aos-bugs, apjagtap, cpassare, lmohanty, myka.rein, pasik, wking, xiuwang
Target Milestone: ---Keywords: Upgrades
Target Release: 4.6.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Prune enabled with image registry Removed Consequence: Pruner job failing because it fails to reach a registry that does not exist (Removed) Fix: Do not attempt to ping the registry if it is removed. Result: Pruner succeeds and removes only etcd objects (do not attempt to remove blobs)
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:27:14 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:
Bug Depends On:    
Bug Blocks: 1872519    

Description Ricardo Maraschini 2020-08-10 18:44:52 UTC
Description of problem:

If image registry is removed the pruner degrades the operator with reason ImagePrunerJobFailed::Removed


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

4.5.5

How reproducible:

Always


Steps to Reproduce:
1. Sets image registry management state as Removed
2. Wait for pruner to run

Actual results:

Image registry operator becomes Degraded

Expected results:

No degradation, as the image registry is removed we should not degrade it.


Additional info:

By https://bugzilla.redhat.com/show_bug.cgi?id=1806686 it seems like we still need to run the pruner so it may be useful to check why it is failing instead of changing the behavior.

Comment 2 Ricardo Maraschini 2020-08-10 19:01:50 UTC
Error reported by pruner pod:

error: unable to determine registry: no managed image found

Comment 6 Wenjing Zheng 2020-08-26 03:39:31 UTC
$ oc logs pods/image-pruner-1598412960-9sn29
error: unable to determine registry: no managed image found
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-25-222652   True        False         60m     Cluster version is 4.6.0-0.nightly-2020-08-25-222652

Waiting for a payload to include the pr.

Comment 7 Wenjing Zheng 2020-08-27 10:11:33 UTC
Verified with below version:
$ oc logs pods/image-pruner-1598523000-8tdq4
Only API objects will be removed.  No modifications to the image registry will be made.
Deleted 0 objects.
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-26-152137   True        False         10h     Cluster version is 4.6.0-0.nightly-2020-08-26-152137

Status:
  Conditions:
    Last Transition Time:  2020-08-27T10:01:30Z
    Message:               Available: The registry is removed
ImagePrunerAvailable: Pruner CronJob has been created
    Reason:                Removed
    Status:                True
    Type:                  Available
    Last Transition Time:  2020-08-27T10:01:30Z
    Message:               Progressing: All registry resources are removed
    Reason:                Removed
    Status:                False
    Type:                  Progressing
    Last Transition Time:  2020-08-26T23:29:16Z
    Message:               Degraded: The registry is removed
    Reason:                Removed
    Status:                False
    Type:                  Degraded

Comment 9 errata-xmlrpc 2020-10-27 16:27:14 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.6 GA Images), 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:4196

Comment 12 mykarein 2022-05-14 13:37:53 UTC Comment hidden (spam)