Skip to content

Commit

Permalink
Repository server controller not retrying again in case of failure (#…
Browse files Browse the repository at this point in the history
…2012)

* retrying after sometime

* error was overridden which was causing reconcile to not happen again
  • Loading branch information
kale-amruta committed May 25, 2023
1 parent 40fb249 commit 12fa310
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ func (r *RepositoryServerReconciler) Reconcile(ctx context.Context, req ctrl.Req
if err := repoServerHandler.CreateOrUpdateOwnedResources(ctx); err != nil {
logger.Info("Setting the CR status as 'ServerStopped' since an error occurred in create/update event")
repoServerHandler.RepositoryServer.Status.Progress = crkanisteriov1alpha1.ServerStopped
if err = r.Status().Update(ctx, repoServerHandler.RepositoryServer); err != nil {
return ctrl.Result{}, err
if uerr := r.Status().Update(ctx, repoServerHandler.RepositoryServer); uerr != nil {
return ctrl.Result{}, uerr
}
r.Recorder.Event(repoServerHandler.RepositoryServer, corev1.EventTypeWarning, "Failed", err.Error())
return ctrl.Result{}, err
}
logger.Info("Setting the CR status as 'ServerReady' after completing the create/update event\n\n\n\n")
Expand Down

0 comments on commit 12fa310

Please sign in to comment.