Skip to content

Commit

Permalink
Merge branch 'main' into K8SPSMDB-958
Browse files Browse the repository at this point in the history
  • Loading branch information
nmarukovich authored Aug 16, 2023
2 parents 7de0ed4 + 8483d1b commit 9bd9d21
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ func (r *ReconcilePerconaServerMongoDBRestore) Reconcile(ctx context.Context, re
return rr, errors.Wrap(err, "get backup")
}

if bcp.Status.State != psmdbv1.BackupStateReady {
switch bcp.Status.State {
case psmdbv1.BackupStateError:
err = errors.New("backup is in error state")
return rr, nil
case psmdbv1.BackupStateReady:
default:
return reconcile.Result{}, errors.New("backup is not ready")
}

Expand Down

0 comments on commit 9bd9d21

Please sign in to comment.