Skip to content

Commit

Permalink
Fix: Chicken-egg problem solved
Browse files Browse the repository at this point in the history
If all monitored backend servers went down, Nauthilus raised an error, which was hindering all the backend servers to come online back again. The solution is to only log failures in filters and not to raise hard errors.

Signed-off-by: Christian Roessner <[email protected]>
  • Loading branch information
Christian Roessner committed Dec 11, 2024
1 parent 817b90d commit 45b5386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lua-plugins.d/filters/monitoring.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function nauthilus_call_filter(request)
nauthilus_util.print_result({ log_format = request.log_format }, result, nil)

if server_host == nil then
error("No backend servers are available")
return nauthilus_builtin.FILTER_ACCEPT, nauthilus_builtin.FILTER_RESULT_FAIL
end

return nauthilus_builtin.FILTER_ACCEPT, nauthilus_builtin.FILTER_RESULT_OK
Expand Down

0 comments on commit 45b5386

Please sign in to comment.