The prometheus datasource was reporting host_ram_usage in MiB as described in the docstring for the base datasource interface definition [1]. However, the gnocchi datasource is reporting it in KiB following ceilometer metric `hardware.memory.used` [2] and the strategies using that metric expect it to be in KiB so the best approach is to change the unit in the prometheus datasource and update the docstring to avoid missunderstandings in future. So, this patch is fixing the prometheus datasource to return host_ram_usage in KiB instead of MiB. Additionally, it is adding more unit tests for the check_threshold method so that it covers the memory based strategy execution, validates the calculated standard deviation and adds the cases where it is below the threshold. [1]15981117ee/watcher/decision_engine/datasources/base.py (L177-L183)[2] https://docs.openstack.org/ceilometer/train/admin/telemetry-measurements.html#snmp-based-meters Closes-Bug: #2113776 Change-Id: Idc060d1e709c0265c64ada16062c3a206c6b04fa (cherry picked from commit6ea362da0b)
15 lines
634 B
YAML
15 lines
634 B
YAML
---
|
|
fixes:
|
|
- |
|
|
When running an audit with the `workload_stabilization` strategy with
|
|
`instance_ram_usage` metric in a deployment with prometheus datasource,
|
|
the host metric for the ram usage was wrongly reported with the incorrect
|
|
unit which lead to incorrect standard deviation and action plans due to the
|
|
application of the wrong scale factor in the algorithm.
|
|
|
|
The host ram usage metric is now properly reported in KB when using a
|
|
prometheus datasource and the strategy `workload_stabilization` calculates
|
|
the standard deviation properly.
|
|
|
|
For more details: https://launchpad.net/bugs/2113776
|