Bug 2256566

Summary: [UI]Setting up the Default StorageClass option as RBD is not working with an external mode cluster.
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Parag Kamble <pakamble>
Component: management-consoleAssignee: Sanjal Katiyar <skatiyar>
Status: CLOSED ERRATA QA Contact: Parag Kamble <pakamble>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.15CC: mparida, muagarwa, odf-bz-bot, skatiyar
Target Milestone: ---   
Target Release: ODF 4.15.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.15.0-112 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-19 15:30:25 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 Parag Kamble 2024-01-03 06:35:36 UTC
Created attachment 2006931 [details]
Snnipet of Create storage System during installation.

Created attachment 2006931 [details]
Snnipet of Create storage System during installation.

Description of problem (please be detailed as possible and provide log
snippests): As per the feature designed in RHSTOR-2452, during the deployment of a storage cluster, enabling the option "RBD as default storage class" is not taking effect for the external mode cluster. However, this is working correctly for the internal mode cluster.

RBD Storageclass Details after installation. 
Its does not contain the annotation data "storageclass.kubernetes.io/is-default-class": "true"
=-=-=-=-=-=-=-=-=-=-=-=-=-=-==--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> oc get sc ocs-external-storagecluster-ceph-rbd -o yaml
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    description: Provides RWO Filesystem volumes, and RWO and RWX Block volumes
  creationTimestamp: "2024-01-03T04:15:22Z"
  name: ocs-external-storagecluster-ceph-rbd
  resourceVersion: "159907"
  uid: f81d40f4-44e9-4224-adfe-89c333527564
parameters:
  clusterID: openshift-storage
  csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner
  csi.storage.k8s.io/controller-expand-secret-namespace: openshift-storage
  csi.storage.k8s.io/fstype: ext4
  csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node
  csi.storage.k8s.io/node-stage-secret-namespace: openshift-storage
  csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner
  csi.storage.k8s.io/provisioner-secret-namespace: openshift-storage
  imageFeatures: layering,deep-flatten,exclusive-lock,object-map,fast-diff
  imageFormat: "2"
  pool: rbd
provisioner: openshift-storage.rbd.csi.ceph.com
reclaimPolicy: Delete
volumeBindingMode: Immediate


Version of all relevant components (if applicable): 4.15


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? NO


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


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. Start installing ODF operator on baremetel cluster
2. during creation of storagecluster make sure that "Set Ceph RBD as the default StorageClass" option is selected.
3. Complete the installation.
4. check the "annotations" data from the default RBD storage class.
#> oc get sc ocs-external-storagecluster-ceph-rbd -o yaml
5. make sure that annotation contain the data '"storageclass.kubernetes.io/is-default-class": "true"'


Actual results:
RBD storage class annotation does not contain the data '"storageclass.kubernetes.io/is-default-class": "true"'

Expected results:
RDB storageclass should contain the following annotations.
'"storageclass.kubernetes.io/is-default-class": "true"'


Additional info:

Comment 2 Malay Kumar parida 2024-01-03 06:43:37 UTC
Ocs operator adds this annotation based on the flag on the storagecluster CR which is set by UI.
When the box in UI is ticked, the field on the storagecluster sc.Spec.ManageCephBlockPools.DefaultStorageClass should be true.

But in this case even when the tickbox was ticked the storagecluster doesn't have the flag set.
Moving to UI to check if UI is passing the flag correctly in external mode.

Comment 3 Malay Kumar parida 2024-01-03 07:09:01 UTC
My apologies, The correct path is sc.spec.managedResources.cephBlockPools.defaultStorageClass.

Comment 7 Sanjal Katiyar 2024-01-11 09:03:24 UTC
RDT not needed... this is 4.15 feature...

Comment 11 errata-xmlrpc 2024-03-19 15:30:25 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.15.0 security, enhancement, & 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/RHSA-2024:1383