correction vcpus in 'nova hypervisor-stats' and horizon

Registered by Sungju Kwon on 2014-06-05

Currently, 'vcpus' field in 'nova hypervisor-stats' and vcpus
in horizon shows physical CPU number instead of vCPUs available
in the system that should do reflect 'cpu_allocation_ratio'.

$ grep "cpu_allocation_ratio" /etc/nova/nova.conf
cpu_allocation_ratio=16.0

$ cat /proc/cpuinfo | grep processor |wc -l
8

$ nova hypervisor-stats | grep "vcpus "
| vcpus | 8 |

It shows 8 for vcpus even though cpu_allocation_ratio is 16.0.

It causes of confusion to the user who especially wants to know
how many vCPUs available to use.
In Horizon, the graph becomes weird when vcpus_used becomes
bigger than vcpus as vcpus returns physical CPU numbers, not
physical cpu # * cpu_allocation_ratio

Related patch: https://review.openstack.org/#/c/93168/

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Sungju Kwon
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.