Skip to content

Commit

Permalink
Ensure the Secondary VRG is updated when DRPC is updated
Browse files Browse the repository at this point in the history
This is mainly to ensure that the VRG on the primary and secondary are in sync
in regards to labels and annotations

Signed-off-by: Benamar Mekhissi <[email protected]>
  • Loading branch information
Benamar Mekhissi authored and ShyamsundarR committed Sep 17, 2024
1 parent 10e34bc commit c247950
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/controller/drplacementcontrolvolsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ func (d *DRPCInstance) ensureVolSyncReplicationCommon(srcCluster string) error {
// Make sure we have Source and Destination VRGs - Source should already have been created at this point
d.setProgression(rmn.ProgressionEnsuringVolSyncSetup)

// Create or update the destination VRG
err := d.createVolSyncDestManifestWork(srcCluster)
if err != nil {
return err
}

vrgMWCount := d.mwu.GetVRGManifestWorkCount(rmnutil.DRPolicyClusterNames(d.drPolicy))

const maxNumberOfVRGs = 2
if len(d.vrgs) != maxNumberOfVRGs || vrgMWCount != maxNumberOfVRGs {
// Create the destination VRG
err := d.createVolSyncDestManifestWork(srcCluster)
if err != nil {
return err
}

return WaitForVolSyncManifestWorkCreation
}

Expand Down

0 comments on commit c247950

Please sign in to comment.