Skip to content

Commit

Permalink
Merge pull request #167 from red-hat-storage/sync_us--main
Browse files Browse the repository at this point in the history
Syncing latest changes from upstream main for ramen
  • Loading branch information
ShyamsundarR authored Dec 26, 2023
2 parents 7b0a91c + 206c862 commit 6f2d2ae
Show file tree
Hide file tree
Showing 6 changed files with 891 additions and 520 deletions.
2 changes: 2 additions & 0 deletions api/v1alpha1/drplacementcontrol_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const (
ReasonCleaning = "Cleaning"
ReasonSuccess = "Success"
ReasonNotStarted = "NotStarted"
ReasonPaused = "Paused"
)

type ProgressionStatus string
Expand All @@ -93,6 +94,7 @@ const (
ProgressionEnsuringVolSyncSetup = ProgressionStatus("EnsuringVolSyncSetup")
ProgressionSettingupVolsyncDest = ProgressionStatus("SettingUpVolSyncDest")
ProgressionDeleting = ProgressionStatus("Deleting")
ProgressionActionPaused = ProgressionStatus("Paused")
)

// DRPlacementControlSpec defines the desired state of DRPlacementControl
Expand Down
14 changes: 12 additions & 2 deletions controllers/drcluster_mmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,22 @@ func (u *drclusterInstance) mModeActivationsRequired() (map[string]ramen.Storage
continue
}

placementObj, err := getPlacementOrPlacementRule(u.ctx, u.client, drpcCollection.drpc, u.log)
if err != nil {
return nil, err
}

vrgNamespace, err := selectVRGNamespace(u.client, u.log, drpcCollection.drpc, placementObj)
if err != nil {
return nil, err
}

required, activationsRequired := requiresRegionalFailoverPrerequisites(
u.ctx,
u.reconciler.APIReader,
[]string{u.object.Spec.S3ProfileName},
drpcCollection.drpc.GetName(),
drpcCollection.drpc.GetNamespace(),
vrgNamespace,
vrgs,
u.object.GetName(),
u.reconciler.ObjectStoreGetter,
Expand Down Expand Up @@ -115,7 +125,7 @@ func (u *drclusterInstance) getVRGs(drpcCollection DRPCAndPolicy) (map[string]*r
return nil, err
}

vrgs, failedToQueryCluster, err := getVRGsFromManagedClusters(
vrgs, _, failedToQueryCluster, err := getVRGsFromManagedClusters(
u.reconciler.MCVGetter,
drpcCollection.drpc,
drClusters,
Expand Down
Loading

0 comments on commit 6f2d2ae

Please sign in to comment.