Skip to content

Commit

Permalink
fixing a regression where SNR doesn't record the last error in case n…
Browse files Browse the repository at this point in the history
…ode isn't found

Signed-off-by: Michael Shitrit <[email protected]>
  • Loading branch information
mshitrit committed Jan 31, 2024
1 parent 7e88291 commit 0567014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/selfnoderemediation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func (r *SelfNodeRemediationReconciler) Reconcile(ctx context.Context, req ctrl.
return ctrl.Result{}, err
}
events.NormalEvent(r.Recorder, snr, eventReasonRemediationStopped, "couldn't find node matching remediation")
return ctrl.Result{}, nil
return ctrl.Result{}, r.updateSnrStatusLastError(snr, err)
}
r.logger.Error(err, "failed to get node", "node name", snr.Name)
return ctrl.Result{}, err
Expand Down

0 comments on commit 0567014

Please sign in to comment.