8000 PVC deselect/delete for VR by ShyamsundarR · Pull Request #2086 · RamenDR/ramen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PVC deselect/delete for VR #2086

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

Closed
wants to merge 4 commits into from

Conversation

ShyamsundarR
Copy link
Member
@ShyamsundarR ShyamsundarR commented Jun 12, 2025

Commit ShyamsundarR@1203605 updated DRPC orchestration to ensure that VRG is Secondary on the cluster before workload is cleaned up, which includes
PVCs.

As a result in VRG orchestration, additional stricter latches are added to determine when to process PVC deletion or deselection as a separate operation from workload deletion due to DR actions.

IOW, PVCs that are deleted/deselected when VRG is primary and not in preparing or executing final sync states, are user deleted PVCs that do not need further protection.

Some minor corrections to handling PVC deselect/delete for VR use cases are also included:

  • Remove VolumeUnprotectionEnabledForAsyncVolRep as it is not required any further, instead if DRPC sets the ramen config option VolumeUnprotectionEnabled VRG can act on PVC deselect/delete as DRPC orchestration would be stricter

  • Cleanup of protected PVCs status is not required at the end of PVC deselection, as the called PVC deselection functions for VR/VS are expected to cleanup protected PVCs

  • Fix envtest failure in multi-namespace support, [BeforeAll]

commit 1203605 updated DRPC orchestration to ensure that VRG is
Secondary on the cluster before workload is cleaned up, which includes
PVCs.

As a result in VRG orchestration, additional stricter latches are added
to determine when to process PVC deletion or deselection as a separate
operation from workload deletion due to DR actions.

IOW, PVCs that are deleted/deseected when VRG is primary and not in preparing
or executing final sync states, are user deleted PVCs that do not need
further protection.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Some minor corrections to handling PVC deselect/delete for VR use cases

- Remove VolumeUnprotectionEnabledForAsyncVolRep as it is not required any
further, instead if DRPC sets the ramen config option VolumeUnprotectionEnabled
VRG can act on PVC deselect/delete as DRPC orchestration would be stricter

- Cleanup of protected PVCs status is not required at the end of PVC
deselection, as the called PVC deselection functions for VR/VS are expected
to cleanup protected PVCs

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
If VRG update fails due to conflict, we need to get the resource
again before retrying. This was not happening causing intermitent
failures in the related test.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
Currently a missing VR, or a requeue return from reconcileMissingVR, in
the flow dealing with PVC deselection or deletion, sets requeue as
true for the VRG. This causes the PVC to not be removed from the protected
PVC status output in pvcUnprotectVolRep.

If reconcileMissingVR reports a missing VR, then processing the PVC
further should stop, and a requeue for the VRG should only be setup
when it returns requeue as true. This is corrected with this commit.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
@ShyamsundarR ShyamsundarR changed the title PVC deselect/delete (draft) PVC deselect/delete for VR Jun 17, 2025
@ShyamsundarR
Copy link
Member Author

e2e testing report:

  • Tested deselect/re-select when a workload is deployed, failed over, relocated, DR re-enabled
  • Tested delete as above

Tested with Subscription based applications and RBD backend, by adding another deployment with the same PVC labels to the namespace, resulting in additional PVCs protected (and hence can be deselected/deleted and used to test the flows in this PR).

Testing required updating ramen config at the hub to set volumeUnprotectionEnabled: true

@ShyamsundarR
Copy link
Member Author

Issues not addressed on this PR and in related PRs: #2095, #2096, #2086 are tracked in #2098

@ShyamsundarR
Copy link
Member Author

Merged as part of #2095

@ShyamsundarR ShyamsundarR deleted the pvc-deselect-vr branch June 18, 2025 21:20
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.

2 participants
0