Bug 1995043

Summary: Two storage systems got created while creating one from UI
Product: OpenShift Container Platform Reporter: Jilju Joy <jijoy>
Component: Console Storage PluginAssignee: Afreen <afrahman>
Status: CLOSED ERRATA QA Contact: Jilju Joy <jijoy>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.9CC: aos-bugs, jarrpa, jefbrown, kramdoss, madam, muagarwa, nberry, nigoyal, nthomas, ocs-bugs
Target Milestone: ---Keywords: TestBlocker
Target Release: 4.9.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: 2021-10-18 17:47:24 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:
Attachments:
Description Flags
Install storage system screencast none

Description Jilju Joy 2021-08-18 10:52:17 UTC
Created attachment 1815151 [details]
Install storage system screencast

Description of problem (please be detailed as possible and provide log
snippests):
Two storage systems got created while creating one from UI. Screen cast of the installation process is attached (the video is 8 minutes long because some other details were also being verified. Jump to 2:35 to see the Review and create page).
Testing was done on VMware cluster. 


Version of all relevant components (if applicable):
OCP 4.9.0-0.nightly-2021-08-17-183417
odf-operator.v4.9.0-96.ci

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Yes, two internal storage systems are not supported.

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
Yes

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Go to Operators --> Installed Operators --> Select Openshift Data Foundation
2. Go to Storage System tab and click on "Create StorageSystem" button.
3. Select "Use an existing storage class" and follow the rest of the steps and click on "Create" button in "review and create" page.
4. Operators --> Installed Operators --> Select Openshift Data Foundatiion --> Storage System tab.
5. Check the list of storage systems

Step 5 from CLI.
# oc get storagesystem
NAME                               STORAGE-SYSTEM-KIND                  STORAGE-SYSTEM-NAME   PHASE
odf-storage-system                 storagecluster.ocs.openshift.io/v1   odf-storage-system    Progressing
odf-storage-system-storagesystem   storagecluster.ocs.openshift.io/v1   odf-storage-system    Progressing


Actual results:
Two storage systems "odf-storage-system" and "odf-storage-system-storagesystem" are present

Expected results:
Only one storage system should be present.

Additional info:

Comment 10 Jose A. Rivera 2021-08-19 13:25:55 UTC
So, the fact that there are two StorageSystems *is* technically a bug. odf-operator looks for a specific annotation on the StorageCluster to determine if it's being "watched" by a StorageSystem[1]. If none exists, we try to find a relevant StorageSystem[2] and add the annotation ourselves. Not finding such a StorageSystem even if it correctly references the StorageCluster by name is a bug.

All that said, the UI is not *technically* required to create a StorageSystem. If one is not found, we will always create a new StorageSystem CR with the name "<storagecluster_name>-storagesystem". The only conceptual complication to this is that odf-operator will create StorageSystems *exclusively* for StorageClusters. Other vendors, like IBM, won't behave this way. You'd still have to create two CRs.

If you're fine with both of these, then yeah you can probably just about creating the StorageSystem for all StorageClusters. I would still want to fix this bug in the odf-operator code anyway.

[1] https://github.com/red-hat-storage/odf-operator/blob/main/controllers/storagecluster_controller.go#L39
[2] https://github.com/red-hat-storage/odf-operator/blob/358bc70daee884f41ae98fb2831b7682c5b0fc08/controllers/storagecluster_controller.go#L120-L129

Comment 16 Jilju Joy 2021-08-31 09:54:39 UTC
Verified in version:
4.9.0-0.nightly-2021-08-29-010334
odf-operator.v4.9.0-117.ci

Created storage system with "Full Deployment" option from UI. Only one storage system was created.

Comment 19 errata-xmlrpc 2021-10-18 17:47:24 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759