Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address missing VR for a PVC during VRG deletion #525

Merged
merged 1 commit into from Aug 22, 2022

Conversation

ShyamsundarR
Copy link
Member

There could be cases where a PVC finalizer is present
but, during VRG deletion, post deletion of the VR the update
to remove the finalizer on the PVC failed.

This would on the next reconcile recreate the VR, which stalls
deletion processing as the VR cannot add finalizers to the PVC
and hence cause the deletion to loop forever and fail.

This commit adds checks to ensure VR is missing and if so
complete the deletion process for the PVC, and if not perform
VR deletion orchestration as usual.

Signed-off-by: Shyamsundar Ranganathan srangana@redhat.com

There could be cases where a PVC finalizer is present
but, during VRG deletion, post deletion of the VR the update
to remove the finalizer on the PVC failed.

This would on the next reconcile recreate the VR, which stalls
deletion processing as the VR cannot add finalizers to the PVC
and hence cause the deletion to loop forever and fail.

This commit adds checks to ensure VR is missing and if so
complete the deletion process for the PVC, and if not perform
VR deletion orchestration as usual.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
)

if v.instance.Spec.Async.Mode != ramendrv1alpha1.AsyncModeEnabled {
return !vrMissing, !requeue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) I think this block is doing the right thing, but it is confusing. In other words, we return "VR Not Missing" when Sync mode is enabled? it is probably clearer to return false, !requeue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, instead of using !vrMissing just return false in this instance.

Copy link
Member

@BenamarMk BenamarMk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raghavendra-talur
Copy link
Member

LGTM

@BenamarMk BenamarMk merged commit 01d4e72 into RamenDR:main Aug 22, 2022
6 checks passed
@ShyamsundarR ShyamsundarR deleted the bz2116605-upstream branch September 28, 2022 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants