Bug 1977329

Summary: [RFE] Allow DBStorageClass to be set from Storage Cluster CR for Noobaa
Product: [Red Hat Storage] Red Hat OpenShift Container Storage Reporter: Kaustav Majumder <kmajumde>
Component: ocs-operatorAssignee: Kaustav Majumder <kmajumde>
Status: CLOSED ERRATA QA Contact: suchita <sgatfane>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.8CC: agantony, etamir, jarrpa, madam, mbukatov, muagarwa, nbecker, nberry, ocs-bugs, rcyriac, sabose, sgatfane, sostapov
Target Milestone: ---Keywords: AutomationBackLog, Bugfix, FutureFeature
Target Release: OCS 4.8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.8.1-177.ci Doc Type: Enhancement
Doc Text:
Previously, it was not possible to deploy the Multicloud Object Gateway (MCG) with other storage classes as the noobaa-db pod consumed storage from the `ocs-ceph-rbd` storage class. With this update, you can set the noobaa-db storageclass name from the Storage Cluster CR. This allows MCG deployment without storage consumption from the `ocs-ceph-rbd` as the Storage Cluster spec includes `DbStorageClassName` in the `MultiCloudGatewaySpec`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-30 14:19:51 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 Kaustav Majumder 2021-06-29 13:23:23 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Currently noobaa-db pod consumes storage from `ocs-ceph-rbd` storage class which make it impossible to deploy noobaa with other storage classes. Also the Noobaa cr spec for this is marked as `immutable` hence can't be edited post deployment either.

Version of all relevant components (if applicable):
ocs-operator-4.7

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


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

This feature will expose Storage Cluster spec to include `DBStorageClass` in the 
`MultiCloudGatewaySpec`allowing noobaa to be deployed without consuming storage from `ocs-ceph-rbd`

Eg-
—
multiCloudGateway:
  reconcileStrategy: "manage"
  dbStorageClass: "gp2"
—


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

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
N.A

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

N.A
Steps to Reproduce:
1.
2.
3.


Actual results:

N.A
Expected results:

N.A
Additional info:N.A

Comment 3 Jose A. Rivera 2021-06-29 16:33:16 UTC
If I remember correctly this need is coming from the managed add-on. We had some discussion about this earlier today and we're still deciding whether we need any actual automation in OCS itself or if it's something the deployer can handle. If we need something in OCS it may be acceptable to have this in OCS 4.8.z, so moving it there and marking it as a potential blocker.

Comment 5 Martin Bukatovic 2021-06-29 20:24:53 UTC
Verification use case: deploy StorageCluster with NooBaa without Ceph using this feature

Comment 11 Sahina Bose 2021-07-06 15:46:05 UTC
Jose, can you confirm if we need change in 4.9 too as well to pass the StorageClass for NooBaa DB PV?

Comment 13 Jose A. Rivera 2021-08-10 15:17:28 UTC
We will need this, yes. If nothing else, we can't just add this new API in 4.8 and then have it disappear in 4.9. But we don't need a BZ for 4.9, just submit a PR to master and it can merge without a BZ. The only requirement is that the release-4.8 version be as similar to the master PR as possible, if not identical.

This BZ already has dev_ack+, so we need someone from QE to give qa_ack+.

Comment 18 Mudit Agarwal 2021-08-16 07:01:31 UTC
Please fill the doc text

Comment 20 Kaustav Majumder 2021-08-17 17:19:46 UTC
In a NON-Managed cluster the Storage Cluster CR needs to be updated as follows :-

```
multiCloudGateway:
  reconcileStrategy: ""
  dbStorageClass: <test-storage-class-name>
```
After deployment succeeds check the noobaa CR
oc get noobaa noobaa -oyaml

The noobaa CR should have the following under spec:
```
dbStorageClass : <test-storage-class-name>
pvPoolDefaultStorageClass : <test-storage-class-name>
```

`

Comment 22 Kaustav Majumder 2021-08-26 07:22:09 UTC
@nberry I overlooked this before, sorry for that. The spec in multiCloudGateway should be dbStorageClassName and not dbStorageClass.

so it should look like this

```
multiCloudGateway:
  reconcileStrategy: ""
  dbStorageClassName: <test-storage-class-name>
```

Comment 31 errata-xmlrpc 2021-08-30 14:19:51 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 (Red Hat OpenShift Container Storage 4.8.1 bug fix 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/RHBA-2021:3312