Nova compute *.percent metrics are always 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Joe Cropper |
Bug Description
It seems that with the recent update to the Nova virt metrics framework in Liberty, the 'percent' related metrics always 0 now in the database. After tracing through the code, I determined tha the virt_driver and resource tracker will still behaving properly and the compute_
It seems that the root cause is:
https:/
This shows that the metric value is expected to be an integer in nova object, but the percentage metrics are all floating points and range in value from [0, 1] -- e.g., so 17.5% has been historically represented as 0.175 using the monitor framework. This causes the percentage values to assume the value 0, as shown below in the snippet from `select metrics from compute_nodes`:
"cpu.user.percent", "value": 0,
"cpu.percent", "value": 0,
...so on and so forth. By the time the metrics get to this spot in the resource tracker:
https:/
...the '*.percent' values are all 0.
I'm not sure if the intended behavior here was to only support integer-style values. If so, we probably need to do some "multiply by 100" logic when putting them into the MonitorMetric object and then divide by 100 (we'll lose precision, though) when we convert back to the values stored in the compute_
description: | updated |
description: | updated |
summary: |
- Compute *.percent metrics are always 0 + Compute *.percent Nova metrics are always 0 |
summary: |
- Compute *.percent Nova metrics are always 0 + Nova compute *.percent metrics are always 0 |
Changed in nova: | |
importance: | Undecided → Medium |
Changed in nova: | |
milestone: | none → liberty-3 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | liberty-3 → 12.0.0 |
Fix proposed to branch: master /review. openstack. org/216923
Review: https:/