-
Notifications
You must be signed in to change notification settings - Fork 58
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
VolumeGroupReplication support #1287
Conversation
6c3d2b0
to
f92801b
Compare
0fe0710
to
04b8580
Compare
25c08da
to
9f5f014
Compare
52b2e50
to
6f0ea6f
Compare
6f0ea6f
to
cab4559
Compare
de5467e
to
820ec01
Compare
820ec01
to
7c49a30
Compare
Spec: volgroup.VolumeGroupReplicationSpec{ | ||
ReplicationState: state, | ||
VolumeGroupReplicationClass: volumeReplicationClass.GetName(), | ||
Selector: &v.instance.Spec.PVCSelector, |
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.
In RBD consistency group, the same pvc selector is used in VolumeGroupReplication with the VolumeReplicationGroup, which means, if CG is enabled, all the pvcs in a VRG should be in a single consistency group?
func (v *VRGInstance) createVR(vrNamespacedName types.NamespacedName, state volrep.ReplicationState) error { | ||
volumeReplicationClass, err := v.selectVolumeReplicationClass(vrNamespacedName) | ||
func (v *VRGInstance) createVR(pvc *corev1.PersistentVolumeClaim, state volrep.ReplicationState) error { | ||
volumeReplicationClass, err := v.selectVolumeReplicationClass(pvc) |
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.
If an application contains multiple PVCs with different StorageClass/Provisioner(these PVCs contains a same label that match the VRG label selector). Ramen will create a replicationgroupreplication with a label selector to select all these pvcs, but they have different storage class, will this be a problem for the replicationgroupreplication?
7c49a30
to
aed7f44
Compare
995d046
to
f52f239
Compare
f52f239
to
0faca36
Compare
Signed-off-by: Elena Gershkovich <[email protected]>
Signed-off-by: Elena Gershkovich <[email protected]>
Signed-off-by: Elena Gershkovich <[email protected]>
0faca36
to
e3c28d7
Compare
func (v *VRGInstance) updateGroupReplicationClassList() error { | ||
labelSelector := v.instance.Spec.Async.ReplicationClassSelector | ||
|
||
v.log.Info("Fetching VolumeGroupReplicationClass", "labeled", labels.Set(labelSelector.MatchLabels)) | ||
listOptions := []client.ListOption{ | ||
client.MatchingLabels(labelSelector.MatchLabels), | ||
} | ||
|
||
if err := v.reconciler.List(v.ctx, v.grpReplClassList, listOptions...); err != nil { | ||
v.log.Error(err, "Failed to list Group Replication Classes", | ||
"labeled", labels.Set(labelSelector.MatchLabels)) | ||
|
||
return fmt.Errorf("failed to list Group Replication Classes, %w", err) | ||
} | ||
|
||
v.log.Info("Number of Group Replication Classes", "count", len(v.grpReplClassList.Items)) | ||
|
||
return 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.
@ELENAGER
Can you please match this update function with the changes coming from https://github.com/RamenDR/ramen/pull/1476/files#diff-a3c633f01e052ce1a42ea903ff76debacd956585919969d1f164ff88a7028f44 ?
and are we sure we should be using the same replicationClassSelector
varibale for groupReplicationClass too or have a separate groupReplicationClassSelector
?
Alternative VolumeGroupReplication support