Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When deleting a primary VRG, we wait until the VR Completed condition is met. However if a VR precondition failed, for example using a drpolicy without flattening enabled when the PVC needs flattening, the VR will never complete, so the vrg will never be deleted. In csi-addons 0.10.0 we have a new Validated VR condition, set to true if pre conditions are met, and false if not. This change handles this new condition. This changes modifies deleted VRG processing to check the new VR Validated status. If the condition exist and the condition status is false, the VR will never complete and it is safe to delete it. In this case validateVRStatus() return true, signaling that the VR is in the desired state, and ramen finish the delete flow. If the VR does not report the Validated condition or the condition status is true, we continue in the normal flow. The VR will be deleted only when the Completed condition status is true. Tested locally with discovered app with pvc created from a volume snapshot. Deleting dr is working again. Issues: - Many unit tests fail Signed-off-by: Nir Soffer <nsoffer@redhat.com>
- Loading branch information