Skip to content

Commit

Permalink
Ignore Secondary VRG Post-HubRecovery to Ensure Proper Reconciliation
Browse files Browse the repository at this point in the history
Post-HubRecovery, if the retrieved VRG from the surviving cluster is secondary,
reconciliation for the workload is wrongly halted. In this fix, we ignore the
secondary VRG when rebuilding the DRPC state to ensure the current action can
proceed.

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2276222

Signed-off-by: Benamar Mekhissi <bmekhiss@ibm.com>
  • Loading branch information
BenamarMk authored and ShyamsundarR committed Jun 10, 2024
1 parent 3c860c3 commit 10065a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion controllers/drplacementcontrol_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,10 @@ func (r *DRPlacementControlReconciler) determineDRPCState(
break
}

if drpc.Spec.Action != rmn.DRAction(vrg.Spec.Action) &&
// Post-HubRecovery, if the retrieved VRG from the surviving cluster is secondary, it wrongly halts
// reconciliation for the workload. Only proceed if the retrieved VRG is primary.
if vrg.Spec.ReplicationState == rmn.Primary &&
drpc.Spec.Action != rmn.DRAction(vrg.Spec.Action) &&
dstCluster == clusterName {
msg := fmt.Sprintf("Stop - Two different actions for the same cluster - drpcAction:'%s'. vrgAction:'%s'",
drpc.Spec.Action, vrg.Spec.Action)
Expand Down

0 comments on commit 10065a3

Please sign in to comment.