Hypervisor API returns CPUs as VCPUs

Bug #1241343 reported by Sam Morrison
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Guangya Liu (Jay Lau)

Bug Description

The stats returns in the hypervisor API are incorrect.

Eg it returns vcpu when they are actually cpus. (or cores to be precise, I think....)

Eg you can have: vcpus = 64 and vcpus_used = 67 (when over allocating)
vcpus should take into account the over allocation ratio.

This is also the case for memory.

Here is an example:

 u'current_workload': 0,
 u'disk_available_least': 2476,
 u'free_disk_gb': 3087,
 u'free_ram_mb': -17108,
 u'hypervisor_type': u'QEMU',
 u'hypervisor_version': 1000000,
 u'local_gb': 5357,
 u'local_gb_used': 2270,
 u'memory_mb': 257836,
 u'memory_mb_used': 274944,
 u'running_vms': 26,
 u'vcpus': 64,
 u'vcpus_used': 67

Tags: libvirt
Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Its an interesting problem, we did encounter this many times. I think it is a good time to do some enhancement in Icehouse.

Not only cpu and memory, but disk also have such issue.

A possbile solution was that add some new fields in DB to record the cpu/memory/disk that have been multipled by allocation ratio, but not update vcpus/memory_mb/free_disk_gb directly.

I think that it might be better to log a blueprint to trace this, as this is more like to be a feature

Changed in nova:
assignee: nobody → Jay Lau (jay-lau-513)
tags: added: libvirt
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.