Skip to content

Commit

Permalink
MetalLBReconciler: log the error on failure
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
liornoy committed Mar 28, 2023
1 parent ba512c3 commit 8923bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/metallb_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8923bd0

Please sign in to comment.