Bug 2087107

Summary: Set default storage class if none is set
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Chris Blum <cblum>
Component: lvm-operatorAssignee: N Balachandran <nibalach>
Status: CLOSED ERRATA QA Contact: Shay Rozen <srozen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jolmomar, lgangava, mmuench, muagarwa, nibalach, ocs-bugs, odf-bz-bot, sapillai
Target Milestone: ---   
Target Release: ODF 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-24 13:53:35 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:

Description Chris Blum 2022-05-17 10:32:30 UTC
Description of problem (please be detailed as possible and provide log
snippests):
If LVMO is installed on a cluster without any default storage class, I expect that LVMO creates its storage class as the default storage class

Version of all relevant components (if applicable):
all

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
no

Is there any workaround available to the best of your knowledge?
yes, set the default storage class manually

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:
no regression

Steps to Reproduce:
1. Install and configure LVMO on a SNO cluster without any other storage provider present
2. List storage classes


Actual results:
One storage class present, none is set as the default

Expected results:
One storage class is present and set as the default

Additional info:

Comment 4 Shay Rozen 2022-06-13 13:33:36 UTC
We are working on clean installation but there can be other SC on customer setup which is already set to default. Can you do in the code check that if there aren't any default SC set then set our to default? @nibalach

Comment 5 N Balachandran 2022-06-14 10:33:10 UTC
(In reply to Shay Rozen from comment #4)
> We are working on clean installation but there can be other SC on customer
> setup which is already set to default. Can you do in the code check that if
> there aren't any default SC set then set our to default? @nibalach

Yes, that is correct. While we assume that LVMO will be the only storage provisioner on the cluster,we are planning to check for existing SCs before setting the topolvm sc to default.

Comment 6 Mudit Agarwal 2022-06-15 14:32:38 UTC
Are we fixing this in 4.11?

Comment 7 N Balachandran 2022-06-15 15:28:30 UTC
(In reply to Mudit Agarwal from comment #6)
> Are we fixing this in 4.11?

Yes. I've just posted the PR to the main branch(https://github.com/red-hat-storage/lvm-operator/pull/210)

Comment 11 errata-xmlrpc 2022-08-24 13:53:35 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 (Important: Red Hat OpenShift Data Foundation 4.11.0 security, enhancement, & bugfix 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-2022:6156