mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-19 15:30:17 +00:00
app/vmselect: fix panic when using /select/multitenant
endpoint (#4912)
app/vmselect: fix panic when using `/select/multitenant` endpoint Such requests must be rejected as not found since vmselect does not support multitenant endpoint. See: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4910 Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
parent
213b5fddbb
commit
56c54bf968
2 changed files with 8 additions and 1 deletions
|
@ -292,6 +292,12 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
|||
httpserver.Errorf(w, r, "auth error: %s", err)
|
||||
return true
|
||||
}
|
||||
if at == nil {
|
||||
// the only option for at to be nil is when p.AuthToken == "multitenant"
|
||||
// vmselect does not have multitenant endpoint, so request must be rejected
|
||||
httpserver.Errorf(w, r, "auth error: tenantID must be specified explicitly in the request path")
|
||||
return true
|
||||
}
|
||||
switch p.Prefix {
|
||||
case "select":
|
||||
return selectHandler(qt, startTime, w, r, p, at)
|
||||
|
|
|
@ -24,9 +24,10 @@ The following `tip` changes can be tested by building VictoriaMetrics components
|
|||
|
||||
## v1.93.x long-time support release (LTS)
|
||||
|
||||
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): correctly re-use HTTP request object on `EOF` retries when querying the configured datasource. Previously, there was a small chance that query retry wouldn't succeed.
|
||||
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): consistently set `User-Agent` header to `vm_promscrape` during scraping with enabled or disabled [stream parsing mode](https://docs.victoriametrics.com/vmagent.html#stream-parsing-mode). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4884).
|
||||
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): consistently set timeout for scraping with enabled or disabled [stream parsing mode](https://docs.victoriametrics.com/vmagent.html#stream-parsing-mode). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4847).
|
||||
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): correctly re-use HTTP request object on `EOF` retries when querying the configured datasource. Previously, there was a small chance that query retry wouldn't succeed.
|
||||
* BUGFIX: vmselect: correctly handle requests with `/select/multitenant` prefix. Such requests must be rejected since vmselect does not support multitenancy endpoint. Previously, such requests were causing panic. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4910).
|
||||
|
||||
## [v1.93.1](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.93.1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue