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

Fix CG PVC Selection Issue Due to storageId Mismatch & Improve Grouping Algorithm #1809

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

BenamarMk
Copy link
Member

@BenamarMk BenamarMk commented Feb 5, 2025

Recently, we started using storageId as part of the label to determine whether a PVC belongs to a consistency group. While the initial deployment and synchronization from the primary to the secondary cluster work correctly, failover or relocation results in a different storageId on the new primary.

This mismatch caused issues when setting up the source and destination again, leading to leaving ReplicationDestination behind causing the sync to occur locally.

Additionally, I refactored the algorithm responsible for building the groups while addressing this issue. The previous implementation was too complex and inefficient. The new approach simplifies the grouping logic while improving performance and making it easier to maintain.

Moreover, the ReplicationGroupDestination and ReplicationGroupSource resource names were too long and tedious to type. To improve usability, I introduced shorter aliases when using oc get. Now, you can simply run:

  • oc get rgd instead of oc get replicationgroupdestination
  • oc get rgs instead of oc get replicationgroupsource

Fixes: DFBUGS-1520

Note: For 4.19, we’ll be switching to ReplicationID instead of storageId. This change won’t affect the refactoring done in this PR.

Recently, we started using storageId as part of the label to determine
whether a PVC belongs to a consistency group. While the initial deployment
and synchronization from primary to secondary clusters work correctly,
failover or relocation results in a different storageId on the new primary.

This mismatch causes issues when setting up the source and destination again.
This fix ensures that PVC selection accounts for storageId differences
to maintain correct CG membership during failover and relocation.

Signed-off-by: Benamar Mekhissi <[email protected]>
@ShyamsundarR ShyamsundarR merged commit 8ed17cd into RamenDR:main Feb 11, 2025
23 checks passed
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.

3 participants