Bug 2141594 - Metadata generated previously for CSI_ENABLE_METADATA enabled displaying for operations done after disabling CSI_ENABLE_METADATA for RBD
Summary: Metadata generated previously for CSI_ENABLE_METADATA enabled displaying for ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: csi-driver
Version: 4.12
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ODF 4.12.0
Assignee: Madhu Rajanna
QA Contact: Amrita Mahapatra
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-10 08:14 UTC by Amrita Mahapatra
Modified: 2023-08-09 16:37 UTC (History)
7 users (show)

Fixed In Version: 4.12.0-113
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-02-08 14:06:28 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-csi pull 3522 0 None open rbd: unset metadata if setmetadata is false 2022-11-11 12:05:24 UTC
Github red-hat-storage ceph-csi pull 151 0 None open BUG 2141594: rbd: unset metadata if setmetadata is false 2022-11-15 09:03:04 UTC

Description Amrita Mahapatra 2022-11-10 08:14:24 UTC
Description of problem (please be detailed as possible and provide log
snippests):
For ocs-storagecluster-ceph-rbd storage class
* Enable metadata flag
* Create PVC
* Disable metadata flag
* Create clone/snapshot
For this scenario operations done after disabling CSI_ENABLE_METADATA flag are still displaying the metadata details generated previously when CSI_ENABLE_METADATA flag enabled.

oc get cm rook-ceph-operator-config -o yaml
apiVersion: v1
data:
  CSI_ENABLE_METADATA: "true"
  CSI_ENABLE_OMAP_GENERATOR: "true"
kind: ConfigMap
metadata:
  creationTimestamp: "2022-11-03T17:22:32Z"
  name: rook-ceph-operator-config
  namespace: openshift-storage
  resourceVersion: "12934242"
  uid: f5bfc9a4-5b2c-47f3-90fa-4676f5324cef

Metadata for the pvc created----
created sub-volume - csi-vol-f882e89b-e740-4eea-b500-e6b59052f44d

oc -n openshift-storage rsh rook-ceph-tools-868cff5cf6-k9rjd rbd image-meta ls ocs-storagecluster-cephblockpool/csi-vol-f882e89b-e740-4eea-b500-e6b59052f44d
There are 4 metadata on this image:

Key                               Value                                   
csi.ceph.com/cluster/name         5c8a5f86-b978-4b1d-9274-9fb9d42898d6    
csi.storage.k8s.io/pv/name        pvc-723909d8-1805-475b-afbc-f0f31615a441
csi.storage.k8s.io/pvc/name       pvc2                                    
csi.storage.k8s.io/pvc/namespace  openshift-storage


Disable CSI_ENABLE_METADATA flag ----
oc patch cm rook-ceph-operator-config -n openshift-storage -p '{"data":{"CSI_ENABLE_METADATA": "false"}}'
configmap/rook-ceph-operator-config patched

oc get cm -n openshift-storage rook-ceph-operator-config -o yaml
apiVersion: v1
data:
  CSI_ENABLE_METADATA: "false"
  CSI_ENABLE_OMAP_GENERATOR: "true"
kind: ConfigMap
metadata:
  creationTimestamp: "2022-11-03T17:22:32Z"
  name: rook-ceph-operator-config
  namespace: openshift-storage
  resourceVersion: "12944473"
  uid: f5bfc9a4-5b2c-47f3-90fa-4676f5324cef


Clone the PVC and check metadata----
created sub-volume - csi-vol-8f405db6-1eba-43d1-81b3-d30d3e6c299c

oc -n openshift-storage rsh rook-ceph-tools-868cff5cf6-k9rjd rbd image-meta ls ocs-storagecluster-cephblockpool/csi-vol-8f405db6-1eba-43d1-81b3-d30d3e6c299c
There are 4 metadata on this image:

Key                               Value                                   
csi.ceph.com/cluster/name         5c8a5f86-b978-4b1d-9274-9fb9d42898d6    
csi.storage.k8s.io/pv/name        pvc-723909d8-1805-475b-afbc-f0f31615a441
csi.storage.k8s.io/pvc/name       pvc2                                    
csi.storage.k8s.io/pvc/namespace  openshift-storage

Create snapshot of the cloned PVC and check metadata----
created sub-volume - csi-snap-053b3903-2b86-49ae-adf5-a6c1c790ad26

oc -n openshift-storage rsh rook-ceph-tools-868cff5cf6-k9rjd rbd image-meta ls ocs-storagecluster-cephblockpool/csi-snap-053b3903-2b86-49ae-adf5-a6c1c790ad26
There are 4 metadata on this image:

Key                               Value                                   
csi.ceph.com/cluster/name         5c8a5f86-b978-4b1d-9274-9fb9d42898d6    
csi.storage.k8s.io/pv/name        pvc-723909d8-1805-475b-afbc-f0f31615a441
csi.storage.k8s.io/pvc/name       pvc2                                    
csi.storage.k8s.io/pvc/namespace  openshift-storage


Version of all relevant components (if applicable):
OCP version --- 4.12.0-0.nightly-2022-10-25-210451
OCS version --- 4.12.0-87


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


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


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


Steps to Reproduce:
1. Enable metadata flag
2. Create PVC
3. Check the metadata created
4. Disable metadata flag
5. Create clone/snapshot
6. Check the metadata created

Actual results: Operations done after disabling CSI_ENABLE_METADATA flag are still displaying the metadata details generated previously for CSI_ENABLE_METADATA flag enabled.


Expected results: For operations done after disabling CSI_ENABLE_METADATA flag metadata should not be available. 


Additional info:


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