Reviewed: https://review.openstack.org/243825 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ddb3c4e26f3a908de7836a8fac48360afa6aa1d7 Submitter: Jenkins Branch: master
commit ddb3c4e26f3a908de7836a8fac48360afa6aa1d7 Author: Surojit Pathak <s...@yahoo-inc.com> 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]. 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. Change-Id: Ib504af33e05dfc4d7e97b52682e27befc67d784a Closes-bug: #1514997 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1514997 Title: Metrics filter receives wrong metric value Status in OpenStack Compute (nova): Fix Released Bug description: With the following turned on in the config, /etc/nova/nova.conf + compute_monitors = virt_driver + scheduler_default_filters = MetricsFilter nova/scheduler/filters/metrics_filter.py: MetricsFilter does not work as intended, as it gets wrong metrics values to work on, even when the data on DB is correct. Snippet from DB - http://paste.openstack.org/show/478481/ While printing the metrics name and value in the filter, the output shows that all the CPU metrics, computed as percentage, were received as 0. Snippet - cpu.user.percent 0 cpu.kernel.time 580491900000000 cpu.kernel.percent 0 cpu.idle.time 8440469190000000 cpu.idle.percent 0 cpu.iowait.time 264054730000000 cpu.percent 0 cpu.user.time 2539292510000000 cpu.frequency 2400 cpu.iowait.percent 0 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1514997/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp