Merge "Use correct metadata for metrics gathered from gnocchi"
This commit is contained in:
@@ -385,6 +385,7 @@ class GnocchiCollector(collector.BaseCollector):
|
|||||||
'resource_type': resource_type,
|
'resource_type': resource_type,
|
||||||
'start': start,
|
'start': start,
|
||||||
'stop': end,
|
'stop': end,
|
||||||
|
'use_history': True,
|
||||||
'groupby': self.conf[metric_name]['groupby'],
|
'groupby': self.conf[metric_name]['groupby'],
|
||||||
'search': self.extend_filter(*query_parameters),
|
'search': self.extend_filter(*query_parameters),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,7 +211,8 @@ class GnocchiCollectorAggregationOperationTest(tests.TestCase):
|
|||||||
resource_type='resource_x',
|
resource_type='resource_x',
|
||||||
search={'=': {'type': 'resource_x'}},
|
search={'=': {'type': 'resource_x'}},
|
||||||
start=self.start, stop=self.end,
|
start=self.start, stop=self.end,
|
||||||
granularity=3600
|
granularity=3600,
|
||||||
|
use_history=True
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_multiple_confs(self):
|
def test_multiple_confs(self):
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
CloudKitty will always use the correct metadata for the
|
||||||
|
processing and reprocessing jobs. This means, we always use
|
||||||
|
the metadata for the timestamp that we are collecting at
|
||||||
|
Gnocchi backend.This is achieved with the use of
|
||||||
|
``use_history=true`` in Gnocchi, which was released under
|
||||||
|
`version 4.5.0 <https://github.com/gnocchixyz/gnocchi/releases/tag/4.5.0>`__.
|
||||||
|
Before that release, the ``aggregates`` API would only return
|
||||||
|
the latest metadata for the resource of the metric being handled.
|
||||||
|
Therefore, for CloudKitty processing and reprocessing, we would
|
||||||
|
always have the possibility of using the wrong attribute version
|
||||||
|
to rate the computing resources.
|
||||||
Reference in New Issue
Block a user