8000 Enable and process GroupClass based replication by rakeshgm · Pull Request #2030 · RamenDR/ramen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enable and process GroupClass based replication #2030

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

rakeshgm
Copy link
Member
@rakeshgm rakeshgm commented May 8, 2025

Following up on #2015, this changes includes

  • The updation of DRClusterConfig with VolumeGroupReplicationClasses and VolumeGroupSnapshotClasses.
  • Update PeerClass.grouping based on VGRC
  • Update PeerClass.grouping based on VGSC

@rakeshgm rakeshgm force-pushed the group-peerClass branch from 132cfce to e1c531b Compare May 9, 2025 08:31
@rakeshgm rakeshgm marked this pull request as ready for review May 9, 2025 09:40
@rakeshgm rakeshgm changed the title Update DRClusterConfig with GroupClasses Enabled and Process GroupClass based Replication May 22, 2025
@rakeshgm rakeshgm changed the title Enabled and Process GroupClass based Replication Enable and process GroupClass based replication May 22, 2025
@rakeshgm rakeshgm force-pushed the group-peerClass branch 3 times, most recently from e609d28 to dbbea78 Compare May 23, 2025 10:17
@rakeshgm
Copy link
Member Author

Next set of VRG Changes will be included in a separate PR.

  • VRG: check if CG is enabled based on grouping flag
  • VRG: process to select VGRs or VSCs based from list of peerClasses

@ShyamsundarR and @BenamarMk. This is ready for Review

@rakeshgm rakeshgm force-pushed the group-peerClass branch 7 times, most recently from 98555f4 to 85f0bba Compare June 19, 2025 10:33
@@ -11,6 +11,7 @@ import (
"time"

volrep "github.com/csi-addons/kubernetes-csi-addons/api/replication.storage/v1alpha1"
groupsnapv1beta1 "github.com/kubernetes-csi/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"
Copy link
Member

Choose a reason for hiding this comment

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

Needs an update post changes to the private VGS API: groupsnapv1beta1 "github.com/red-hat-storage/external-snapshotter/client/v8/apis/volumegroupsnapshot/v1beta1"

vrClasses: vrClasses,
vsClasses: vsClasses,
vgrClasses: vgrClasses,
vgsClasses: vgsClasses,
}, nil
}

Copy link
Member

Choose a reason for hiding this comment

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

deleteViewsForClasses should prune VGR and VSC class views.

vrcID := getAsyncVRClassPeer(scName, cls[0], cl, sID, sIDcl, schedule)
vgrcID := getAsyncVGRClassPeer(scName, cls[0], cl, sID, sIDcl, schedule)

rID, grouping := isGroupingEnabledForReplication(vrcID, vgrcID)
Copy link
Member

Choose a reason for hiding this comment

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

This line (and function) can be replaced by the following:
grouping := rID != "" && rID == vgrcID (retain the output of getAsyncVRClassPeer in rID instead of vrcID)

},
},
Spec: volrep.VolumeReplicationClassSpec{
Provisioner: "sample2.csi.com",
Parameters: map[string]string{
VRClassScheduleKey: "1m",
ReplicationClassScheduleKey: "1m",
Copy link
Member

Choose a reason for hiding this comment

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

We need some tests for grouping behavior here.

rakeshgm added 2 commits July 3, 2025 21:13
DRClusterConfig will be updated with
VolumeGroupReplicationClasses and
VolumeGroupSnapshotClasses

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
rakeshgm added 9 commits July 3, 2025 22:07
remove references of ClusterClaims in the tests
and rephrase the descriptions with DRClusterConfig Status

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
rename VolumeReplicationIDLabel to ReplicationIDLabel
since this is now being used in VolumeGroupReplicationClass
as well as VolumeReplicationClass

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
enable grouping based on VolumeGroupReplicationClass.
grouping is enabled if and only if replication id
matches both volumeGroupRepliationClass and volumeReplicationClass
which belong to the same storageClass with same storageID

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
since this key is now being used for
VGRC and VRC, it makes sense to have a
common name. The key is renamed to
ReplicationClassScheduleKey

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
enable grouping based on VolumeGroupSnapshotClass.
grouping is enabled if VGRC belongs to the same storageClass
with the same storageID

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
when DRPC is annotated for CG, udpate
peerClass.grouping to true. This check is to ensure
there is a backward comptability of drpc was already annotated

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
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