CPU metrics are reported as a normalized value in [0,1].
When scheduler reads the data as MonitorMetric object, as part
of update_from_compute_node(), the value of the metric gets
lost due to a wrong type conversion, typecasting into an Integer,
reduces it to 0.
Note:
- It may seem unintuitive that to fix the same, we are not changing
the type of metric from Integer to Float. Please refer the
discussions -
* https://review.openstack.org/#/c/243825/
* https://review.openstack.org/#/c/216923/
- To summarize, we are trying to save some 'possible' downstream consumer
of metrics updates from compute nodes, i.e. consuming from AMPQ, from
software upgrade scenarios.
Reviewed: https:/ /review. openstack. org/243825 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=ddb3c4e26f3 a908de7836a8fac 48360afa6aa1d7
Committed: https:/
Submitter: Jenkins
Branch: master
commit ddb3c4e26f3a908 de7836a8fac4836 0afa6aa1d7
Author: Surojit Pathak <email address hidden>
Date: Wed Nov 25 19:21:24 2015 +0000
Fix wrong CPU metric value in metrics_filter
CPU metrics are reported as a normalized value in [0,1]. from_compute_ node(), the value of the metric gets
When scheduler reads the data as MonitorMetric object, as part
of update_
lost due to a wrong type conversion, typecasting into an Integer,
reduces it to 0.
Note: /review. openstack. org/#/c/ 243825/ /review. openstack. org/#/c/ 216923/
- It may seem unintuitive that to fix the same, we are not changing
the type of metric from Integer to Float. Please refer the
discussions -
* https:/
* https:/
- To summarize, we are trying to save some 'possible' downstream consumer
of metrics updates from compute nodes, i.e. consuming from AMPQ, from
software upgrade scenarios.
Change-Id: Ib504af33e05dfc 4d7e97b52682e27 befc67d784a
Closes-bug: #1514997