From 8e950a68b49a890d3b7a3e27612a1d3e1a09f8fe Mon Sep 17 00:00:00 2001 From: Benamar Mekhissi Date: Mon, 4 Dec 2023 15:20:23 -0500 Subject: [PATCH] Fix and reformat 2 comments Signed-off-by: Benamar Mekhissi --- controllers/drplacementcontrol.go | 4 ++-- controllers/util/mw_util.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/drplacementcontrol.go b/controllers/drplacementcontrol.go index 19f2d6de3..fe438dd1b 100644 --- a/controllers/drplacementcontrol.go +++ b/controllers/drplacementcontrol.go @@ -1204,7 +1204,7 @@ func (d *DRPCInstance) switchToCluster(targetCluster, targetClusterNamespace str vrgState = vrg.Status.State } - d.log.Info(fmt.Sprintf("PVs/PVCs have been Restored? %v and VRG Primary %v", restored, vrgState)) + d.log.Info(fmt.Sprintf("PVs/PVCs have been Restored? '%v' and VRG Primary='%v'", restored, vrgState)) if !restored || vrg.Status.State != rmn.PrimaryState { d.setProgression(rmn.ProgressionWaitingForResourceRestore) @@ -1987,7 +1987,7 @@ func (d *DRPCInstance) ensureVRGDeleted(clusterName string) bool { } func (d *DRPCInstance) updateVRGState(clusterName string, state rmn.ReplicationState) (bool, error) { - d.log.Info(fmt.Sprintf("Updating VRG ReplicationState to secondary for cluster %s", clusterName)) + d.log.Info(fmt.Sprintf("Updating VRG ReplicationState to %s for cluster %s", state, clusterName)) vrg, err := d.getVRGFromManifestWork(clusterName) if err != nil { diff --git a/controllers/util/mw_util.go b/controllers/util/mw_util.go index 51196e899..4753d32c6 100644 --- a/controllers/util/mw_util.go +++ b/controllers/util/mw_util.go @@ -532,6 +532,7 @@ func (mwu *MWUtil) createOrUpdateManifestWork( func (mwu *MWUtil) GetVRGManifestWorkCount(drClusters []string) int { count := 0 + for _, clusterName := range drClusters { _, err := mwu.FindManifestWorkByType(MWTypeVRG, clusterName) if err != nil {