Bug 1867792 - Pruner degrades image registry operator if the latter is removed
Summary: Pruner degrades image registry operator if the latter is removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.5
Hardware: All
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.6.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks: 1872519
TreeView+ depends on / blocked
 
Reported: 2020-08-10 18:44 UTC by Ricardo Maraschini
Modified: 2023-12-15 18:47 UTC (History)
9 users (show)

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)
Clone Of:
Environment:
Last Closed: 2020-10-27 16:27:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 520 0 None closed Bug 1867792: Allow prune to move on with Removed registry 2021-02-10 15:04:33 UTC
Red Hat Knowledge Base (Solution) 5367151 0 None None None 2020-12-12 17:53:02 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:27:18 UTC

Internal Links: 1958791

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)

Note You need to log in before you can comment on or make changes to this bug.