diff --git a/internal/controller/drplacementcontrol.go b/internal/controller/drplacementcontrol.go index 8eee6d53b2..89583afb89 100644 --- a/internal/controller/drplacementcontrol.go +++ b/internal/controller/drplacementcontrol.go @@ -1850,10 +1850,6 @@ func (d *DRPCInstance) ensureVRGManifestWorkOnClusterDeleted(clusterName string) d.log.Info("Request not complete yet", "cluster", clusterName) - if d.instance.Spec.ProtectedNamespaces != nil && len(*d.instance.Spec.ProtectedNamespaces) > 0 { - d.setProgression(rmn.ProgressionWaitOnUserToCleanUp) - } - // IF we get here, either the VRG has not transitioned to secondary (yet) or delete didn't succeed. In either cases, // we need to make sure that the VRG object is deleted. IOW, we still have to wait return !done, nil @@ -1915,6 +1911,10 @@ func (d *DRPCInstance) ensureVRGIsSecondaryOnCluster(clusterName string) bool { return false } + if d.instance.Spec.ProtectedNamespaces != nil && len(*d.instance.Spec.ProtectedNamespaces) > 0 { + d.setProgression(rmn.ProgressionWaitOnUserToCleanUp) + } + return true }