From 3f80bce8118cdca32273c8b6413247c844e8bbd0 Mon Sep 17 00:00:00 2001 From: Matthias Bertschy Date: Fri, 10 Oct 2025 14:23:07 +0200 Subject: [PATCH] fix: improve error handling in hostscanner pod validation Signed-off-by: Matthias Bertschy --- core/pkg/hostsensorutils/hostsensordeploy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pkg/hostsensorutils/hostsensordeploy.go b/core/pkg/hostsensorutils/hostsensordeploy.go index 522e01b2..d4119687 100644 --- a/core/pkg/hostsensorutils/hostsensordeploy.go +++ b/core/pkg/hostsensorutils/hostsensordeploy.go @@ -96,7 +96,7 @@ func (hsh *HostSensorHandler) Init(ctx context.Context) error { hsh.populatePodNamesToNodeNames(ctx, log) if err := hsh.checkPodForEachNode(); err != nil { - logger.L().Ctx(ctx).Warning(failedToValidateHostSensorPodStatus, helpers.Error(err)) + return fmt.Errorf("%s: %v", failedToValidateHostSensorPodStatus, err) } return nil