gnocchixyz / gnocchi

Timeseries database
Apache License 2.0
298 stars 84 forks source link

[bug] GET Metric measurements returns an empty list #1346

Closed bkranendonk closed 9 months ago

bkranendonk commented 9 months ago

Before reporting an issue on Gnocchi, please be sure to provide all necessary information.

Which version of Gnocchi are you using

4.4.2

How to reproduce your problem


date; openstack metric measures show vcpus --resource-id 9d724023-b9d8-48ab-9f18-0007e101a888
Thu Oct 12 13:19:59 UTC 2023

date; openstack metric measures show vcpus --resource-id 9d724023-b9d8-48ab-9f18-0007e101a888
Thu Oct 12 13:20:01 UTC 2023

 date; openstack metric measures show vcpus --resource-id 9d724023-b9d8-48ab-9f18-0007e101a888
Thu Oct 12 13:20:03 UTC 2023
 timestamp                 | granularity | value |
 2023-05-23T16:05:00+00:00 |       300.0 |   3.0 |
 2023-05-23T17:00:00+00:00 |       300.0 |   3.0 |
 2023-05-23T18:00:00+00:00 |       300.0 |   3.0 |
 2023-05-23T19:00:00+00:00 |       300.0 |   3.0 |
 2023-05-23T20:00:00+00:00 |       300.0 |   3.0 |

 date; openstack metric measures show vcpus --resource-id 9d724023-b9d8-48ab-9f18-0007e101a888
Thu Oct 12 13:20:06 UTC 2023

date; openstack metric measures show vcpus --resource-id 9d724023-b9d8-48ab-9f18-0007e101a888
Thu Oct 12 13:20:08 UTC 2023

What is the result that you get

Sometimes a HTTP 200 with an empty list as result. Sometimes a HTTP 200 with the actual populated list of measurements as result.

 REQ: curl -g -i -X GET "https://metering.mycloud.example/v1/resource/generic/9d724023-b9d8-48ab-9f18-0007e101a888/metric/vcpus/measures?start=None&stop=None&aggregation=None&granularity=None&refresh=False&resample=None" -H "Accept: application/json" -H "User-Agent: openstacksdk/1.4.0 keystoneauth1/5.2.1 python-requests/2.31.0 CPython/3.8.10" -H "X-Auth-Token: {SHA256}6d3bf4686691966144012c5dac900000000000000000000000"
Starting new HTTPS connection (1): metering.mycloud.example:443
https://metering.mycloud.example:443 "GET /v1/resource/generic/9d724023-0000-48ab-9f18-0007e101a888/metric/vcpus/measures?refresh=False HTTP/1.1" 200 2
RESP: [200] Connection: keep-alive Content-Length: 2 Content-Type: application/json Date: Thu, 12 Oct 2023 13:20:37 GMT Front-End-Https: on Server: nginx
RESP BODY: []

What is result that you expected

Always a HTTP 200 with the actual populated list of measurements as result.

Things i've tried

Additional info

Noteworthy configuration

[incoming]
driver = redis
redis_url = REDACTED

[storage]
driver = file
file_basepath = /var/lib/gnocchi
bkranendonk commented 9 months ago

Looks like 2 of the 3 servers within this loadbalanced Gnocchi env. always return a empty list hence is why it has a "50/50" response rate (more like 30/70).

Does the maintainer has any expierience with such issue? Many thanks.

/Bram