Bug 1798618 - unable to finalize resource
Summary: unable to finalize resource
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.3.0
Hardware: x86_64
OS: All
medium
low
Target Milestone: ---
: 4.5.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks: 1809466 1809467
TreeView+ depends on / blocked
 
Reported: 2020-02-05 17:00 UTC by Jatan Malde
Modified: 2023-03-24 16:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Delete registry configuration without a proper storage configuration. Consequence: The resource was never finalized due to the lack of storage configuration - the operator could not remove the storage as it does not know about. Fix: Making storage configuration optional. Result: Resource now is completely finalized.
Clone Of:
: 1809466 1809467 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:14:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 462 0 None closed Bug 1798618: Make driver on Mutators optional. 2020-10-07 18:24:32 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:14:28 UTC

Description Jatan Malde 2020-02-05 17:00:00 UTC
Description of problem:

IHAC recently deployed OCP 4.3 on vsphere and see the following message with the image-registry while they apply the patch mentioned for non-production cluster, 

~~~
E0204 12:36:16.365396      13 controller.go:257] unable to sync: unable to finalize resource: storage backend not configured, requeuing
I0204 12:36:16.365471      13 finalizer.go:40] finalizing *v1.Config, Name=cluster
I0204 12:36:17.358735      13 generator.go:340] object *v1.ClusterOperator, Name=image-registry updated: changed:metadata.resourceVersion={"8651327" -> "8651341"}, changed:metadata.selfLink={"/apis/config.openshift.io/v1/clusteroperators/image-registry" -> "/apis/config.openshift.io/v1/clusteroperators/image-registry/status"}, changed:status.conditions.0.lastTransitionTime={"2020-02-04T12:36:15Z" -> "2020-02-04T12:36:16Z"}, changed:status.conditions.2.lastTransitionTime={"2020-02-04T12:36:16Z" -> "2020-02-04T12:36:17Z"}
E0204 12:36:17.359035      13 controller.go:257] unable to sync: unable to finalize resource: storage backend not configured, requeuing
~~~

     $ oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'

The latest must-gather from the cluster is included as well. 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

The image-regsitry cluster operator is in Degraded state and the status section for the 'configs.imageregistry.operator.io' is not getting updated. 

Expected results:


Additional info:

Comment 5 Oleg Bulatov 2020-02-11 15:24:24 UTC
Jatan, when the operator detects that it doesn't have the config resource, it runs Bootstrap() [1].

[1]: https://github.com/openshift/cluster-image-registry-operator/blob/0ba502438b44e663ae5adbacf0b4eb2bfd41aac0/pkg/operator/bootstrap.go#L33

Comment 8 Ricardo Maraschini 2020-02-19 20:08:41 UTC
Moving this ticket to version 4.5. We gonna need to create other tickets to back port the solution.

Comment 16 Wenjing Zheng 2020-03-31 03:51:20 UTC
Verified on 4.5.0-0.nightly-2020-03-30-203132:
1. On an UPI cluster, remove config:
$oc delete crd  configs.imageregistry.operator.openshift.io
2. Check image registry pod is gone and no below log in operator log:
"unable to sync: unable to get generators: storage backend not configured, requeuing"

Comment 19 errata-xmlrpc 2020-07-13 17:14:06 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, 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


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