Bug 2017392

Summary: [DR] check local rbd image state for resyncVolume Response
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Madhu Rajanna <mrajanna>
Component: csi-driverAssignee: Madhu Rajanna <mrajanna>
Status: CLOSED CURRENTRELEASE QA Contact: Sidhant Agrawal <sagrawal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9CC: madam, muagarwa, ocs-bugs, odf-bz-bot, srangana
Target Milestone: ---   
Target Release: ODF 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v4.9.0-210.ci Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-07 17:46:31 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 Madhu Rajanna 2021-10-26 12:27:32 UTC
below are the local states of the mirrored image, cephcsi should consider the states to report back the error or the ready state for resyncVolumeResponse so that volume replication operator can update the resync condition in the Volume Replication CR properly.


"unknown" -> If the image is in an error state means data is completely synced
"error" -> If the image is in an error state means it needs resync
"syncing"
"starting_replay"
"replaying" -> If the image is in a replaying state means its replaying from primary source
"stopping_replay"
"stopped"

If the resync is successfully started which means the image will be in a "replaying" state we can consider "replaying" state to report resync successfully going on the state.
we are discarding the intermediate states like "syncing", "starting_replay" and "stopping_replay".

addition details at https://bugzilla.redhat.com/show_bug.cgi?id=2012143#c12