From 8923bd0923da2aa5a2e28509351f84651b146785 Mon Sep 17 00:00:00 2001 From: liornoy Date: Tue, 28 Mar 2023 15:13:00 +0300 Subject: [PATCH] MetalLBReconciler: log the error on failure This commit changes the way the MetalLBReconciler logs an error on the Reconcile function, added the error's content into the log. This change is required as we faced flakes hitting this line and not reporting the error, making it hard to debug. Signed-off-by: liornoy --- controllers/metallb_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/metallb_controller.go b/controllers/metallb_controller.go index 96cb63ef5..fcebf0e7e 100644 --- a/controllers/metallb_controller.go +++ b/controllers/metallb_controller.go @@ -110,7 +110,7 @@ func (r *MetalLBReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct } } if err := status.Update(context.TODO(), r.Client, instance, condition, errorMsg, wrappedErrMsg); err != nil { - logger.Info("Failed to update metallb status", "Desired status", status.ConditionAvailable) + logger.Error(err, "Failed to update metallb status", "Desired status", status.ConditionAvailable) } } return result, err