Bug 2099965

Summary: rbd: provide option to disable setting metadata on RBD images
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Prasanna Kumar Kalever <prasanna.kalever>
Component: csi-driverAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED ERRATA QA Contact: kmanohar
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.11CC: ebenahar, madam, muagarwa, ocs-bugs, odf-bz-bot, ypadia
Target Milestone: ---Keywords: Regression
Target Release: ODF 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.11.0-127 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-24 13:55:09 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 Prasanna Kumar Kalever 2022-06-22 06:03:03 UTC
Description of problem (please be detailed as possible and provide log
snippests):

As part of regular upstream sync activity, we by default got RBD image metadata addition support to the ceph-csi 4.11 branch.
As we have support to set the metadata on the RBD images, with all the PVC and volume snapshots, by default metadata is set on all the images.
But we are hitting https://bugzilla.redhat.com/show_bug.cgi?id=1989527 a lot many times with this feature enabled, and start to leave a lot of stale images.
Hence we need to provide an option to disable setting the image metadata.

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Hitting https://bugzilla.redhat.com/show_bug.cgi?id=1989527 a lot of times with this feature enabled, and start to leave a lot of stale images


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

Can this issue reproducible?
Yes

If this is a regression, please provide more details to justify this:
Yes it is a regression because setting metadata was not part of previous releases


Steps to Reproduce:
Create a few PVs


Actual results:
No stale resources left over


Expected results:
We see stale resources

Additional info:
Need back port of https://github.com/ceph/ceph-csi/pull/3016

Comment 3 krishnaram Karthick 2022-06-27 13:47:42 UTC
@Prasanna
what are the steps to verify this bug?
Are there any additional tests to be run apart from bug verification?

Comment 9 kmanohar 2022-07-22 10:59:10 UTC
@prasanna Please add your comments on this.

I Performed the following steps:-

1) Create a PVC (test-k)
2) Create a PVC snapshot
3) Create a PVC Clone (test-k-clone)
4) Verified the RBD images, metadata is still displayed.


Build - 4.11-113

OUTPUT:-

rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-f5d6ce78-0990-11ed-a16d-0a580a810212-temp
There are 3 metadata on this image:

Key                               Value                                   
csi.storage.k8s.io/pv/name        pvc-b0af9dde-18aa-428c-b5e1-2f383d5bdd8b
csi.storage.k8s.io/pvc/name       test-k                                  
csi.storage.k8s.io/pvc/namespace  default 



rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-f5d6ce78-0990-11ed-a16d-0a580a810212     
There are 3 metadata on this image:

Key                               Value                                   
csi.storage.k8s.io/pv/name        pvc-6a62edb5-9dcc-423a-a2f9-2f982b231915
csi.storage.k8s.io/pvc/name       test-k-clone                            
csi.storage.k8s.io/pvc/namespace  default  


rbd image-meta list ocs-storagecluster-cephblockpool/csi-snap-dff90565-0990-11ed-a16d-0a580a810212
There are 3 metadata on this image:

Key                               Value                                   
csi.storage.k8s.io/pv/name        pvc-b0af9dde-18aa-428c-b5e1-2f383d5bdd8b
csi.storage.k8s.io/pvc/name       test-k                                  
csi.storage.k8s.io/pvc/namespace  default

Comment 11 kmanohar 2022-08-02 07:49:45 UTC
VERIFICATION COMMENTS

Verified Build - 4.11-129

OUTPUT:-

rbd image-meta list ocs-storagecluster-cephblockpool/csi-snap-7d03dd5a-1235-11ed-b3e2-0a580a800213
There are 0 metadata on this image.

rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-85e17f8e-1235-11ed-b3e2-0a580a800213-temp
There are 0 metadata on this image.

rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-1556c9fe-122f-11ed-b3e2-0a580a800213
There are 0 metadata on this image.

rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-accf23f3-1232-11ed-b3e2-0a580a800213
There are 0 metadata on this image.

rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-6e564291-1224-11ed-b3e2-0a580a800213
There are 0 metadata on this image.

sh-4.4$ rbd image-meta list ocs-storagecluster-cephblockpool/csi-vol-6fe432c7-1235-11ed-b3e2-0a580a800213
There are 0 metadata on this image.

Comment 13 errata-xmlrpc 2022-08-24 13:55:09 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