Skip to content

[WIP] global VGR support for agnostic DR#2426

Draft
parikshithb wants to merge 3 commits intoRamenDR:mainfrom
parikshithb:global_vgr
Draft

[WIP] global VGR support for agnostic DR#2426
parikshithb wants to merge 3 commits intoRamenDR:mainfrom
parikshithb:global_vgr

Conversation

@parikshithb
Copy link
Member

This is the initial implementation for the Global VGR support described in the Ramen Controller and Consensus Logic story (Approach 2).

Labels VRGs with storageID when VGRClass is globally scoped, and blocks VGR creation until all VRGs with the same storageID agree on the same action.

@@ -751,6 +754,10 @@ func (v *VRGInstance) updateAsyncPVCs(pvcList *corev1.PersistentVolumeClaimList)
}

if offloaded {
Copy link
Member

Choose a reason for hiding this comment

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

Offloaded here will be either for individual VGRs or one single global VGR. Maybe move the check in 905 to processOffloadedPCs
Or maybe just add a new function called isGlobalOffload() that will return true or false

for idx := range vrgList.Items {
vrg := &vrgList.Items[idx]

if vrg.Spec.Action != expectedAction {
Copy link
Member

@BenamarMk BenamarMk Feb 19, 2026

Choose a reason for hiding this comment

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

Check the action, replicationstate, and the drplacementcontrol.ramendr.openshift.io/destination-cluster annotation on the destination cluster.

Make sure that every VRG using the same VRGClass has identical values for these fields.

The annotation format is:
drplacementcontrol.ramendr.openshift.io/destination-cluster: <clusterName>

@parikshithb parikshithb force-pushed the global_vgr branch 2 times, most recently from d5258c4 to d6afff7 Compare February 20, 2026 13:26
When a VRG's PVCs use a globally scoped VGRClass, label the VRG
with the storageID from its StorageClass. Before creating or
updating a VolumeGroupReplication resource, verify that all VRGs
with the same storageID agree on action, replication state, and
destination cluster. If consensus is not reached, requeue and
wait until all sibling VRGs are aligned.

Signed-off-by: Parikshith <[email protected]>
After consensus is reached, override VGR name and namespace
for globally offloaded VRGs, and skip owner references since
global VGRs are cross namespace.

Signed-off-by: Parikshith <[email protected]>
Signed-off-by: Parikshith <[email protected]>
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