From 1c60affd27a2dcda0384043d80460355d8d61dd1 Mon Sep 17 00:00:00 2001 From: Debian Date: Wed, 27 May 2026 13:31:56 +0200 Subject: [PATCH] fix(scheduler): same fieldAt i<=0 bug as haproxy_stats.go safeAt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fieldAt() in the scheduler used i<=0 instead of i<0, causing pxname (column 0 in HAProxy CSV) to always return "". The HasPrefix("", "eg_backend_") check then filtered every row → byBackend was always empty → backend.down alert never fired since the check was introduced. v1.1.115. Co-Authored-By: Claude Sonnet 4.6 --- VERSION | 2 +- cmd/edgeguard-api/main.go | 2 +- cmd/edgeguard-ctl/main.go | 2 +- cmd/edgeguard-scheduler/main.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 1f83700..97553d5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.114 +1.1.115 diff --git a/cmd/edgeguard-api/main.go b/cmd/edgeguard-api/main.go index 4050582..03ed3da 100644 --- a/cmd/edgeguard-api/main.go +++ b/cmd/edgeguard-api/main.go @@ -60,7 +60,7 @@ import ( usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users" ) -var version = "1.1.114" +var version = "1.1.115" func main() { addr := os.Getenv("EDGEGUARD_API_ADDR") diff --git a/cmd/edgeguard-ctl/main.go b/cmd/edgeguard-ctl/main.go index b528206..37c6025 100644 --- a/cmd/edgeguard-ctl/main.go +++ b/cmd/edgeguard-ctl/main.go @@ -11,7 +11,7 @@ import ( "git.netcell-it.de/projekte/edgeguard-native/internal/services/setup" ) -var version = "1.1.114" +var version = "1.1.115" const usage = `edgeguard-ctl — EdgeGuard CLI diff --git a/cmd/edgeguard-scheduler/main.go b/cmd/edgeguard-scheduler/main.go index 9b1c34a..4834fc1 100644 --- a/cmd/edgeguard-scheduler/main.go +++ b/cmd/edgeguard-scheduler/main.go @@ -41,7 +41,7 @@ import ( "git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts" ) -var version = "1.1.114" +var version = "1.1.115" const ( // renewTickInterval — how often we re-evaluate expiring certs. @@ -769,7 +769,7 @@ func runBackendDownCheck(ctx context.Context, pool *pgxpool.Pool, a *alerts.Serv } func fieldAt(fields []string, i int) string { - if i <= 0 || i >= len(fields) { + if i < 0 || i >= len(fields) { return "" } return fields[i]