Bug 1722878

Summary: Changing storage type makes impossible to delete config.imageregistry.operator.openshift.io
Product: OpenShift Container Platform Reporter: Oleg Bulatov <obulatov>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: adam.kaplan, aos-bugs, xiuwang
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: after changing the storage type in the image registry operator's configuration, the previous and new storage types would appear in the operator's status Consequence: the image registry operator fails to tear itself down when the image registry operator's configuration is deleted Fix: only one storage type is allowed to appear in the operator's status Result: the image registry operator can be removed after changing the storage used by the image registry
Story Points: ---
Clone Of:
: 1759159 (view as bug list) Environment:
Last Closed: 2020-01-23 11:04:11 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: 1759159    

Description Oleg Bulatov 2019-06-21 14:47:37 UTC
Description of problem:

We you decide to change your storage (for example, from S3 to PVC), the information about the old storage doesn't get evicted from the config.imageregistry.operator.openshift.io Status field.

As a result, finalization of the config resource fails because it sees two configurations.

Steps to Reproduce:
1. Create a cluster on S3.
2. Wait until the image registry gets deployed.
3. oc edit config.imageregistry.operator.openshift.io: change spec.storage so that it uses another storage
4. oc delete config.imageregistry.operator.openshift.io

Actual results:

The resource cannot be deleted.

Expected results:

The resource is deleted.

Comment 3 XiuJuan Wang 2019-10-16 10:35:44 UTC
Could reproduce this in 4.2 version 4.2.0-0.nightly-2019-10-11-230724
Verified in 4.3.0-0.nightly-2019-10-15-180816.
Steps:
1. Create a cluster based on aws platfrom which used s3 storage default.
2. Wait until the image registry gets deployed.
3. oc edit config.imageregistry.operator.openshift.io: change spec.storage to use pvc.
4. Check config.imageregistry again, the status.storage only have one method storage.
5. Delete config.imageregistry, it can be deleted quickly.

Comment 5 errata-xmlrpc 2020-01-23 11:04:11 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:0062