Closed sp98 closed 3 years ago
Hey can you paste in the CR YAML for the first step? I can't seem to find replicationImage
in any of the CRDs. Thanks!
missed your message. Its been changed to replicationState
recently.
I think we need to think about it. if the state is secondary and the user tried to delete the CR. we can just delete the CR without doing anything or let the CR deletion fails as storage is now allowing to disable replication.
I would suggest continuing with the CR deletion (as thats what the user wanted to do). If there is error regarding the image being Secondary, we can ignore that.
The garbage collection of the secondary image would be done when primary VR is deleted, as that would progress to disable and then when the PVC/PV is deleted, delete the required image.
Hence, on a VR deletion when secondary, we can just allow the deletion of the VR resource and not take any action against storage.
The one corner case would be to ensure we are actually secondary and not in a split-brain, as I am unsure if in that condition the image would be garbage collected when replication is disabled on the primary. If we could test this, we should be good to either leave the image as split-brain or to resync it and then delete the VR resource, leaving the image behind for the primary workflow to delete the same.
@sp98 is it still the case?
We can close this.