-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: main
Are you sure you want to change the base?
Conversation
e609d28
to
dbbea78
Compare
Next set of VRG Changes will be included in a separate PR.
@ShyamsundarR and @BenamarMk. This is ready for Review |
98555f4
to
85f0bba
Compare
@@ -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" |
There was a problem hiding this comment.
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 | ||
} | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
DRClusterConfig will be updated with VolumeGroupReplicationClasses and VolumeGroupSnapshotClasses Signed-off-by: rakeshgm <rakeshgm@redhat.com>
Signed-off-by: rakeshgm <rakeshgm@redhat.com>
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>
Following up on #2015, this changes includes