Wrong hypervisor statistics reported

Bug #1417340 reported by Liyingjun
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Liyingjun

Bug Description

The hypervisor statistics reported through nova hypervisor-stats is wrong if there are other nova services running on the compute node, output below:

$ nova hypervisor-stats
+----------------------+-------+
| Property | Value |
+----------------------+-------+
| count | 5 |
| current_workload | 0 |
| disk_available_least | 395 |
| free_disk_gb | 455 |
| free_ram_mb | 34160 |
| local_gb | 455 |
| local_gb_used | 0 |
| memory_mb | 39920 |
| memory_mb_used | 5760 |
| running_vms | 15 |
| vcpus | 20 |
| vcpus_used | 15 |
+----------------------+-------+

But i only have 3 instances launched, and 1 hypervisor with 4 vcpus... seems like the result is multiplied by 5.

$ nova hypervisor-list
+----+---------------------+
| ID | Hypervisor hostname |
+----+---------------------+
| 1 | holly |
+----+---------------------+

$ nova hypervisor-show 1
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| cpu_info_arch | x86_64 |
| cpu_info_features | ["pge", "clflush", "sep", "syscall", "vme", "dtes64", "tsc", "xsave", "vmx", "xtpr", "cmov", "ssse3", "est", "pat", "monitor", "lm", "msr", "nx", "fxsr", "tm", "sse4.1", "pae", "acpi", "de", "mmx", "osxsave", "cx8", "mce", "mtrr", "ht", "pse", "lahf_lm", "pdcm", "mca", "apic", "sse", "ds", "pni", "tm2", "sse2", "ss", "pbe", "fpu", "cx16", "pse36", "ds_cpl"] |
| cpu_info_model | Penryn |
| cpu_info_topology_cores | 4 |
| cpu_info_topology_sockets | 1 |
| cpu_info_topology_threads | 1 |
| cpu_info_vendor | Intel |
| current_workload | 0 |
| disk_available_least | 79 |
| free_disk_gb | 91 |
| free_ram_mb | 6832 |
| host_ip | 192.168.70.11 |
| hypervisor_hostname | holly |
| hypervisor_type | QEMU |
| hypervisor_version | 2000000 |
| id | 1 |
| local_gb | 91 |
| local_gb_used | 0 |
| memory_mb | 7984 |
| memory_mb_used | 1152 |
| running_vms | 3 |
| service_disabled_reason | - |
| service_host | holly |
| service_id | 5 |
| state | up |
| status | enabled |
| vcpus | 4 |
| vcpus_used | 3 |
+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/152372

Changed in nova:
status: New → In Progress
Liyingjun (liyingjun)
description: updated
Changed in nova:
importance: Undecided → High
Changed in nova:
assignee: Liyingjun (liyingjun) → Sylvain Bauza (sylvain-bauza)
Changed in nova:
milestone: none → kilo-3
tags: added: compute
tags: added: low-hanging-fruit
Changed in nova:
assignee: Sylvain Bauza (sylvain-bauza) → Liyingjun (liyingjun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/152372
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=968275f1efe27821fab0b949353ddd7e6fcec583
Submitter: Jenkins
Branch: master

commit 968275f1efe27821fab0b949353ddd7e6fcec583
Author: liyingjun <email address hidden>
Date: Tue Feb 3 10:11:29 2015 +0800

    Fixes logic in compute_node_statistics

    The filter is wrong in compute_node_statistics, currently, if there
    are other nova services in the compute node, the statistics will be
    caculated multiplied by services count, because it didn't filter
    out the nova-compute services. Fix the bug by adding a filter
    'models.Service.binary == "nova-compute"' in query.

    Change-Id: Icc16e92e61594e8700608006f56c45d424d1edf9
    Closes-bug: #1417340

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-3 → 2015.1.0
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.