VictoriaMetrics/app
LHHDZ 3a45bbb4e0
app/vmauth: fix discovering backend IPs when url_prefix contains hostname with srv+ prefix (#6401)
This change fixes the following panic:
```
2024-06-04T11:16:52.899Z        warn    app/vmauth/auth_config.go:353   cannot discover backend SRV records for http://srv+localhost:8080: lookup localhost on 10.100.10.4:53: server misbehaving; use it literally
panic: runtime error: integer divide by zero

goroutine 9 [running]:
github.com/VictoriaMetrics/VictoriaMetrics/lib/httpserver.handlerWrapper.func1()
        /Users/lhhdz/wd/projects/go/VictoriaMetrics/lib/httpserver/httpserver.go:291 +0x58
panic({0x103115100?, 0x10338d700?})
        /Users/lhhdz/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.3.darwin-arm64/src/runtime/panic.go:770 +0x124
main.getLeastLoadedBackendURL({0x0?, 0x22?, 0x1400014757b?}, 0x1400013c120?)
        /Users/lhhdz/wd/projects/go/VictoriaMetrics/app/vmauth/auth_config.go:473 +0x210
main.(*URLPrefix).getBackendURL(0x140000aa080)
        /Users/lhhdz/wd/projects/go/VictoriaMetrics/app/vmauth/auth_config.go:312 +0xb8
```

---------

Co-authored-by: Haley Wang <haley@victoriametrics.com>
2024-06-12 12:30:44 +02:00
..
victoria-logs lib/logstorage: work-in-progress 2024-05-25 00:30:58 +02:00
victoria-metrics Add build support for loong64 (#6222) 2024-05-09 14:22:03 +02:00
vlinsert lib/logstorage: work-in-progress 2024-05-25 00:30:58 +02:00
vlogsgenerator lib/logstorage: work-in-progress 2024-05-25 00:30:58 +02:00
vlselect lib/logstorage: work-in-progress 2024-06-11 17:50:32 +02:00
vlstorage lib/logstorage: work-in-progress 2024-05-25 21:36:16 +02:00
vmagent lib/httpserver: allow reloadAuthKey and configAuthKey to override htt… (#6338) 2024-06-10 12:09:47 +02:00
vmalert lib/httpserver: allow reloadAuthKey and configAuthKey to override htt… (#6338) 2024-06-10 12:09:47 +02:00
vmalert-tool vmalert-tool: fix float values template in input_series (#6395) 2024-06-03 11:49:44 +02:00
vmauth app/vmauth: fix discovering backend IPs when url_prefix contains hostname with srv+ prefix (#6401) 2024-06-12 12:30:44 +02:00
vmbackup Add build support for loong64 (#6222) 2024-05-09 14:22:03 +02:00
vmbackupmanager all: replace old https://docs.victoriametrics.com/vmbackupmanager.html url with the new one - https://docs.victoriametrics.com/vmbackupmanager/ 2024-04-18 02:03:58 +02:00
vmctl vmctl: rm --vm-disable-progress-bar flag 2024-06-10 14:02:46 +02:00
vmgateway all: replace old https://docs.victoriametrics.com/vmgateway.html url with the new one - https://docs.victoriametrics.com/vmgateway/ 2024-04-18 02:08:18 +02:00
vminsert lib/httpserver: allow reloadAuthKey and configAuthKey to override htt… (#6338) 2024-06-10 12:09:47 +02:00
vmrestore Add build support for loong64 (#6222) 2024-05-09 14:22:03 +02:00
vmselect app/vmselect/vmui: run make vmui-update after c236e3c03c1bf8ca00292b800a839fcb300e7e51 and 04744c274c269f6b6efb45f68df11abe0fb0ce25 2024-06-07 16:39:19 +02:00
vmstorage lib/mergeset: adds tracking for indexdb records drop (#6297) 2024-05-24 14:55:20 +02:00
vmui vmui/logs: add markdown support (#6292) 2024-06-10 16:38:13 +02:00