From 5cc2e49297c28e56aa8c729a439aec3fc0565a34 Mon Sep 17 00:00:00 2001 From: f41gh7 Date: Thu, 31 Oct 2024 20:20:02 +0100 Subject: [PATCH] app/vmgateway: fixes rate limit for multitenant requests Previously vmgateway returned error for the requests with multitenant tenant. This commit allows to rate limit multitenant requests and apply global rate limit for it. Currently it supports only queries for rate limiting. Related issue: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7201 This commit also addresses gateway start-up crash if datasource.url is not accessible. Previously vmgateway could crash at start-up with enabled rate limiting if datasource for metrics was not avaiable for any reason. It seems, that crash is expected. But in fact it's not. For instance, datasource could be in restart phase. Replaces crash with log message error. It increased availability of vmgateway component. Signed-off-by: f41gh7 --- docs/changelog/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog/CHANGELOG.md b/docs/changelog/CHANGELOG.md index b236ee582..50d39167a 100644 --- a/docs/changelog/CHANGELOG.md +++ b/docs/changelog/CHANGELOG.md @@ -29,6 +29,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). * BUGFIX: [dashboards](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards) for Single-node VictoriaMetrics, cluster: The free disk space calculation now will subtract the size of the `-storage.minFreeDiskSpaceBytes` flag to correctly display the remaining available space of Single-node VictoriaMetrics/vmstorage rather than the actual available disk space, as well as the full ETA. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7334) for the details. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`. +* BUGFIX: [vmgateway](https://docs.victoriametrics.com/vmgateway): properly forward [multitenant](https://docs.victoriametrics.com/cluster-victoriametrics/#multitenancy) requests with `-clusterMode`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7201) for details. * BUGFIX: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): prevent panic when ingesting samples which are outisde of configured [retention filters](https://docs.victoriametrics.com/#retention-filters). This could happen when backfilling data with retention filters which exclude samples from the backfill range. * BUGFIX: [vmctl](https://docs.victoriametrics.com/vmctl/): fix issue with series matching for `vmctl vm-native` with `--vm-native-disable-per-metric-migration` flag enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7309). * BUGFIX: [vmui](https://docs.victoriametrics.com/#vmui): fix the display of the link to vmalert. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5924).