Bug 2222726

Summary: Disallow enabling snapshot-based mirroring on cloned images
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Shyamsundar <srangana>
Component: RBD-MirrorAssignee: Ilya Dryomov <idryomov>
Status: CLOSED ERRATA QA Contact: Sunil Angadi <sangadi>
Severity: high Docs Contact: Akash Raj <akraj>
Priority: unspecified    
Version: 6.1CC: akraj, amagrawa, bniver, ceph-eng-bugs, cephqe-warriors, idryomov, kseeger, muagarwa, sangadi, sostapov, srangana, tserlin, vdas
Target Milestone: ---   
Target Release: 6.1z2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-17.2.6-105.el9cp Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2230076 2312925 (view as bug list) Environment:
Last Closed: 2023-10-12 16:34:33 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:
Bug Depends On:    
Bug Blocks: 2235257    

Description Shyamsundar 2023-07-13 14:53:16 UTC
Description of problem:

As "Parent data is not copied up when cloned images are mirrored.", any image that is a clone should be prevented from being mirror enabled.

As a feature DR does not support mirroring volumes that are clones of snapshots or of other volumes. The request in this BZ is to hence enforce the same in code, such that it is never silently ignored as that can cause image corruption as noted in the ceph tracker below.

See related ceph tracker https://tracker.ceph.com/issues/61891

Additional info:

The intent of this bz is for VolumeReplication (VR) to error out enabling replication for images that are clones. Which hence would result in VR never being successfully processed, and the error/state would percolate upwards to layers like Ramen VRG/DRPC and result in the user noting the failure to protect the desired volumes.

Notes:

Ramen VRG detecting a PVC as a clone from a snapshot or another volume if the volume is an RBD backed image is another feasible option. This does not however prevent cases where the image is pre-created and also introduces into Ramen a notion of which storage backend it is dealing with to report errors. As a result adding this in the VolumeReplication relateg EnableReplication gRPC layer is more suited as this is an unsupported feature by the specific storage backend (ceph-RBD in this case).

Comment 4 Niels de Vos 2023-07-14 07:23:19 UTC
It sounds as if this needs to be addressed in Ceph.

If a workaround is needed in Ceph-CSI to report about mirroring cloned images, we need a way to detect what Ceph version does not handle them correctly (assuming a future release supports it). Is there any check that Ceph-CSI can do before starting the mirroring of a cloned image?

Comment 20 errata-xmlrpc 2023-10-12 16:34:33 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 Ceph Storage 6.1 security, enhancement, 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-2023:5693