VictoriaMetrics/app
LHHDZ 41e4135371
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 11:47:44 +02:00
..
victoria-logs lib/logstorage: work-in-progress 2024-05-25 00:31:55 +02:00
vlinsert lib/logstorage: work-in-progress 2024-05-25 00:31:55 +02:00
vlogsgenerator lib/logstorage: work-in-progress 2024-05-25 00:31:55 +02:00
vlselect lib/logstorage: work-in-progress 2024-06-11 17:51:01 +02:00
vlstorage lib/logstorage: work-in-progress 2024-05-25 21:36:24 +02:00
vmagent lib/httpserver: allow reloadAuthKey and configAuthKey to override htt… (#6338) 2024-06-10 12:41:29 +02:00
vmalert lib/httpserver: allow reloadAuthKey and configAuthKey to override htt… (#6338) 2024-06-10 12:41:29 +02:00
vmalert-tool docs: convert png images to webp in all the docs except of docs/operator/* 2023-11-22 19:29:47 +02:00
vmauth app/vmauth: fix discovering backend IPs when url_prefix contains hostname with srv+ prefix (#6401) 2024-06-12 11:47:44 +02:00
vmbackup Add build support for loong64 (#6222) 2024-05-10 14:32:05 +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:04:39 +02:00
vmctl vmctl: rm --vm-disable-progress-bar flag 2024-06-10 14:05:58 +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:53 +02:00
vminsert follow-up after 77f22fdb8d (#6458) 2024-06-11 12:08:00 +02:00
vmrestore Add build support for loong64 (#6222) 2024-05-10 14:32:05 +02:00
vmselect app/vmselect/vmui: run make vmui-update after c236e3c03c1bf8ca00292b800a839fcb300e7e51 and 04744c274c269f6b6efb45f68df11abe0fb0ce25 2024-06-07 16:39:06 +02:00
vmstorage lib/mergeset: adds tracking for indexdb records drop (#6297) 2024-05-24 16:08:34 +02:00
vmui vmui/logs: add markdown support (#6292) 2024-06-10 16:39:25 +02:00