CPU Metrics not working

Bug #1564182 reported by Mohammed Naser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Mohammed Naser

Bug Description

The metrics collection on compute nodes is currently not working.

When the compute node creates the object to save, it is divided to be a value inside [0,1]. However, at the same time, when the scheduler needs to pull out the numbers, it divides it once again as it pulls the objects:

https://github.com/openstack/nova/blob/stable/liberty/nova/compute/resource_tracker.py#L437
https://github.com/openstack/nova/blob/stable/liberty/nova/compute/monitors/base.py#L60-L63
https://github.com/openstack/nova/blob/stable/liberty/nova/objects/monitor_metric.py#L68-L71

This essentially means that it always returns a value of zero as a metric, because it divides a small number again by 100.

Revision history for this message
Mohammed Naser (mnaser) wrote :

Actually, that was a bit misinformed, the problem seems to be here:

https://github.com/openstack/nova/blob/stable/liberty/nova/objects/monitor_metric.py#L40

Changed in nova:
assignee: nobody → Mohammed Naser (mnaser)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Mohammed Naser (<email address hidden>) on branch: master
Review: https://review.openstack.org/299708
Reason: Already fixed, replaced for a backport patch: https://review.openstack.org/#/c/299708/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.