Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing Hub Recovery: Reworking DRPC State Rebuilding Algorithm #1165

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading