Skip to content

Commit

Permalink
Skip processing unavailable cluster
Browse files Browse the repository at this point in the history
When the cluster is unavailable we cannot access the cluster or the s3
store, and nothing is likely to succeed.

Signed-off-by: Nir Soffer <[email protected]>
  • Loading branch information
nirs committed Nov 20, 2023
1 parent a43f0a4 commit 6b48a48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/drcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ func (r DRClusterReconciler) processCreateOrUpdate(u *drclusterInstance) (ctrl.R

u.log.Info("create/update")

if drClusterIsUnavailable(u.object) {
u.log.Info("Skipping unavailable drcluster")
return ctrl.Result{}, nil

Check failure on line 321 in controllers/drcluster_controller.go

View workflow job for this annotation

GitHub Actions / Golangci Lint

return with no blank line before (nlreturn)
}

_, ramenConfig, err := ConfigMapGet(u.ctx, r.APIReader)
if err != nil {
return ctrl.Result{}, fmt.Errorf("config map get: %w", u.validatedSetFalseAndUpdate("ConfigMapGetFailed", err))
Expand Down

0 comments on commit 6b48a48

Please sign in to comment.