Bug 1063169

Summary: display the actual CPU allocation of a VM to manage inconsistencies
Product: Red Hat Enterprise Virtualization Manager Reporter: Roy Golan <rgolan>
Component: ovirt-engineAssignee: Roy Golan <rgolan>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acathrow, gklein, iheim, lpeer, mavital, michal.skrivanek, ofrenkel, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: org.ovirt.engine-root-3.4.0-17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roy Golan 2014-02-10 08:02:24 UTC
Description of problem:
Due to libvirt Bug 1017858  an attempt to unplug a CPU will return an error although
the actual CPUs will be unplugged. this causes an inconsistency in the engine
view of the CPU count of the VM. 

To reflect this inconsistency we would provide the "Actual CPU count" under the static provisioned CPU count
which today consist of Cores/Sockets and Sockets

example:
After setting the number of sockets to 1 we get a failure. After the report has been collected from the VM
we should see:

 VMs -> General subtab
   Sockets:           2
   Cores Per Sockets: 2
   Actual CPU allocation: 2 vCpus -> tooltip: "2/1/1 2 cores 1 socket 1 thread"

Comment 1 Ilanit Stein 2014-05-18 12:35:18 UTC
Tested on av9.1, guest: rhel6.5, kernel 2.6.32-431.17.1.el6.x86_64.

As rhevm-guest-image version yet support cpu guest reporting,
I used this special rhem-guest-image version, rhevm-guest-agent-1.0.9-2.el6ev.src.rpm, x86_64:
https://brewweb.devel.redhat.com/taskinfo?taskID=7461052

UI "Guest CPU Count" field indeed reflect the actual cpu number,
same as seen using 'lscpu' on a rhel6.5 guest.

For cpu hot Plug via UI & via vdsm ('vdsClient -s 0 setNumberOfCpus {vmId} , {number}') "Guest CPU Count" field was updated correctly.

For cpu hot Unplug via 'vdsClient -s 0 setNumberOfCpus {vmId} {number}' ,  
"Guest CPU Count" field was updated correctly.
Te cpu hot unplug is blocked vi UI for av9.1, and thus used here the vdsm command instead.
Important to mention here that for a kernel from lower version (kernel 2.6.32-431) the cpu hot unplug gives an error:
"Operation not supported: qemu didn't unplug the vCPUs properly".

Comment 2 Itamar Heim 2014-06-12 14:06:48 UTC
Closing as part of 3.4.0