Bug 1998851 - Disabling Ceph File System also disable Ceph RBD VolumeSnapshotStorageClass
Summary: Disabling Ceph File System also disable Ceph RBD VolumeSnapshotStorageClass
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: ocs-operator
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ODF 4.9.0
Assignee: Jose A. Rivera
QA Contact: akarsha
URL:
Whiteboard:
Depends On:
Blocks: 2002235
TreeView+ depends on / blocked
 
Reported: 2021-08-29 12:39 UTC by Denis Ollier
Modified: 2023-08-09 17:00 UTC (History)
9 users (show)

Fixed In Version: v4.9.0-158.ci
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2002235 (view as bug list)
Environment:
Last Closed: 2021-12-13 17:45:28 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage ocs-operator pull 1332 0 None None None 2021-09-08 06:24:20 UTC
Red Hat Product Errata RHSA-2021:5086 0 None None None 2021-12-13 17:46:09 UTC

Description Denis Ollier 2021-08-29 12:39:08 UTC
Description of problem
----------------------

When deploying an OCS StorageCluster with Ceph FS disabled and Ceph RBD enabled, the VolumeSnapshotClass for Ceph RBD is not created.

Steps to Reproduce
------------------

Create an OCS StorageCluster with Ceph FS disabled and Ceph RBD enabled:

> ---
> kind: StorageCluster
> apiVersion: ocs.openshift.io/v1
> metadata:
>   name: ocs-storagecluster
>   namespace: openshift-storage
> spec:
>   managedResources:
>     cephBlockPools:
>       reconcileStrategy: manage
>     cephFilesystems:
>       reconcileStrategy: ignore
> [...] 

Actual results
--------------

Ceph File System is not deployed as expected.
Ceph RBD is deployed but its VolumeSnapshotClass is not created.

Expected results
----------------

VolumeSnapshotClass for Ceph RBD (ocs-storagecluster-rbdplugin-snapclass) should be created.

Additional info
---------------

Looking at the code the issue seems due to a copy/paste mistake:

=> https://github.com/openshift/ocs-operator/blob/master/controllers/storagecluster/volumesnapshotterclasses.go

> func newCephFilesystemSnapshotClassConfiguration(instance *ocsv1.StorageCluster) SnapshotClassConfiguration {
> 	return SnapshotClassConfiguration{
> 		snapshotClass:     newVolumeSnapshotClass(instance, cephfsSnapshotter),
> 		reconcileStrategy: ReconcileStrategy(instance.Spec.ManagedResources.CephFilesystems.ReconcileStrategy),
> 		disable:           instance.Spec.ManagedResources.CephFilesystems.DisableSnapshotClass,
> 	}
> }
> 
> func newCephBlockPoolSnapshotClassConfiguration(instance *ocsv1.StorageCluster) SnapshotClassConfiguration {
> 	return SnapshotClassConfiguration{
> 		snapshotClass:     newVolumeSnapshotClass(instance, rbdSnapshotter),
> 		reconcileStrategy: ReconcileStrategy(instance.Spec.ManagedResources.CephFilesystems.ReconcileStrategy),
> 		disable:           instance.Spec.ManagedResources.CephFilesystems.DisableSnapshotClass,
> 	}
> }

The function newCephBlockPoolSnapshotClassConfiguration uses Ceph FS configuration (instance.Spec.ManagedResources.CephFilesystems) instead of Ceph RDB configuration (instance.Spec.ManagedResources.CephBlockPools).

Comment 2 Sahina Bose 2021-08-31 14:10:42 UTC
Is this issue seen with OCS 4.8 too?

Comment 3 Denis Ollier 2021-08-31 14:21:56 UTC
According to git, affected versions are OCS 4.7, OCS 4.8 and OCS 4.9.

Comment 6 Sahina Bose 2021-09-07 14:31:31 UTC
Mudit, we may need this bug backported to OCS 4.8.z

Comment 7 Mudit Agarwal 2021-09-07 15:04:11 UTC
Sure, will clone it once we have all the acks for 4.9
Is anyone working on it?

Comment 19 errata-xmlrpc 2021-12-13 17:45:28 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: Red Hat OpenShift Data Foundation 4.9.0 enhancement, security, and 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-2021:5086


Note You need to log in before you can comment on or make changes to this bug.