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

VolumeGroupReplication support #1287

Closed
wants to merge 3 commits into from

Conversation

ELENAGER
Copy link
Member

Alternative VolumeGroupReplication support

@ELENAGER ELENAGER changed the title Add VolumeGroupReplication support Alternative VolumeGroupReplication support Mar 25, 2024
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch 8 times, most recently from 6c3d2b0 to f92801b Compare April 1, 2024 11:20
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch 6 times, most recently from 0fe0710 to 04b8580 Compare April 8, 2024 07:38
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch 12 times, most recently from 25c08da to 9f5f014 Compare April 16, 2024 14:31
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch 3 times, most recently from 52b2e50 to 6f0ea6f Compare April 18, 2024 13:59
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from 6f0ea6f to cab4559 Compare April 18, 2024 14:25
@ELENAGER ELENAGER changed the title Alternative VolumeGroupReplication support VolumeGroupReplication support Apr 30, 2024
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from de5467e to 820ec01 Compare April 30, 2024 07:23
@ELENAGER ELENAGER marked this pull request as ready for review April 30, 2024 07:33
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from 820ec01 to 7c49a30 Compare May 7, 2024 14:34
Spec: volgroup.VolumeGroupReplicationSpec{
ReplicationState: state,
VolumeGroupReplicationClass: volumeReplicationClass.GetName(),
Selector: &v.instance.Spec.PVCSelector,
Copy link
Member

@youhangwang youhangwang May 15, 2024

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)
Copy link
Member

@youhangwang youhangwang May 15, 2024

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?

@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from 7c49a30 to aed7f44 Compare May 20, 2024 11:21
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch 3 times, most recently from 995d046 to f52f239 Compare June 19, 2024 12:58
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from f52f239 to 0faca36 Compare June 23, 2024 20:22
@ELENAGER ELENAGER force-pushed the another_consistency_groups branch from 0faca36 to e3c28d7 Compare July 1, 2024 10:18
Comment on lines +740 to +759
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
}

Copy link
Contributor

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 ?

cc @ShyamsundarR @Madhu-1 @kseegerrh

@ELENAGER ELENAGER closed this Jul 22, 2024
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