Skip to content

daemon: remove unnecessary error handling/logging

This commit removes unnecessary error handling (write to log AND returning the error) in the legacy daemon logic. It's enough to return the error because errors returned by Hive lifecycle hooks will be handled and logged in Hive (also with the scope of the error (module-id)).

Example with "duplicated" log for the same error

time=2025-11-14T15:10:21.781424096Z level=error msg="BPF masquerading does not yet support masquerading to source IP from routing layer" module=agent.controlplane.daemon
time=2025-11-14T15:10:21.781495299Z level=error msg="Start hook failed" function="cmd.daemonConfigInitialization.func1 (cmd/daemon_main.go:1263) (agent.controlplane.daemon)" error="failed to init and validate daemon config: BPF masquerading to route source (--enable-masquerade-to-route-source=\"true\") currently not supported with BPF-based masquerading (--enable-bpf-masquerade=\"true\")"

Merge request reports

Loading