Description of problem: VMs on SCVMM report cores per socket and number of sockets incorrectly Version-Release number of selected component (if applicable): 5.8.2 How reproducible: all the time Steps to Reproduce: 1.set up scvmm provider 2.refresh 3.compare values for cores per socket and number of sockets to the values reported in the provider Actual results: the two values are switched around Expected results: the numbers are correctly accounted Additional info:
Felix the screenshot from SCVMM just shows that it has 4 processors is that correct? Is the expectation that it would be 1 socket and 4 cores? We collect PhsyicalCPUCount and the LogicalProcessorCount and CoresPerCPU properties from SCVMM so I would argue that what CFME collects and displays is more informative.
(In reply to Adam Grare from comment #4) > Felix the screenshot from SCVMM just shows that it has 4 processors is that > correct? Is the expectation that it would be 1 socket and 4 cores? > > We collect PhsyicalCPUCount and the LogicalProcessorCount and CoresPerCPU > properties from SCVMM so I would argue that what CFME collects and displays > is more informative. I'll ask the customer if he has a better example.
Please note that there is a lspci output from within the VM: # lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 I doubt that there is any further need for other examples: we have the screenshot from CFME and the lspci output, showing clearly that CFME mixes the two relevant values: the number of sockets reports the number of cores and vice versa.
Sorry the parameters that I pasted were for the host not the VM. We parse the Vm CPU params here: https://github.com/ManageIQ/manageiq-providers-scvmm/blob/master/app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb#L405-L407 I dumped the whole VM object and I don't see anything that indicates a difference between sockets and cores. The only parameter that SCVMM returns that I see is CPUCount.
So if SCVMM only returns CPUCount, that should not be interpreted as the number of sockets, right? And why is cpu_cores_per_socket hard coded to 1? If we only get CPUCount from SCVMM we should at least not treat it arbitrarily in a way that we usually get as many sockets as total CPU cores. That simply doesn't make any sense.
> So if SCVMM only returns CPUCount, that should not be interpreted as the number of sockets, right? Without any additional info on the CPU topology from SCVMM we are only guessing on this. The only info we know for sure is that the total number of logical CPUs is 4. > If we only get CPUCount from SCVMM we should at least not treat it arbitrarily in a way that we usually get as many sockets as total CPU cores. That simply doesn't make any sense. I don't know that arbitrarily treating CPUCount to be equal to the number of cores is any more accurate than being equal to the number of sockets. They're both just guesses without SCVMM telling us exactly how many sockets/cores there are. If it is well known that SCVMM means cores when they say CPUCount then I'm fine switching this to hard-coding 1 socket and CPUCount cores. If you give a VM 128 CPUs is that reported as 128 cores though?
I tried adding 8 vCPUs to one of our VMs. CPUCount reported 8 CPUs, the OS reported 2 sockets and 4 cores per socket. There is not enough information provided by SCVMM to report this the way that the guest OS would see it. The only sane thing I can see doing would be to only set cpu_total_cores and leaving cpu_sockets and cpu_cores_per_socket nil. This is a little confusing on the UI because it shows "8 ( Sockets x 0 Cores)" but the UI could be updated to show this properly.
Without any further information from SCVMM I totally agree that we should only show cpu_total_cores - everything else is just guesswork. It would be great if the UI could be updated to for example not show "(Sockets x Cores)" if any of the values is zero.
https://github.com/ManageIQ/manageiq-providers-scvmm/pull/51
New commit detected on ManageIQ/manageiq-providers-scvmm/master: https://github.com/ManageIQ/manageiq-providers-scvmm/commit/b0bad3a83b84738b9c1208c7e623eb34fa332638 commit b0bad3a83b84738b9c1208c7e623eb34fa332638 Author: Adam Grare <agrare> AuthorDate: Wed Nov 29 11:37:30 2017 -0500 Commit: Adam Grare <agrare> CommitDate: Wed Nov 29 11:37:30 2017 -0500 Don't report misleading sockets/cores SCVMM doesn't return any information regarding how many sockets or cores_per_socket exist on a VM, only the total number of CPUs. Currently we report all of these CPUs as sockets with 1 core per socket. This is misleading since the guest OS typically reports something different, e.g. CPUCount: 4 => 1 socket x 4 cores and CPUCount: 8 => 2 socket x 4 cores. Rather than guessing on the socket/cores count we can just set the cpu_total_cores value and leave the rest blank. https://bugzilla.redhat.com/show_bug.cgi?id=1514463 app/models/manageiq/providers/microsoft/infra_manager/refresh_parser.rb | 2 -- .../models/manageiq/providers/microsoft/infra_manager/refresher_spec.rb | 2 -- 2 files changed, 4 deletions(-)
https://github.com/ManageIQ/manageiq-ui-classic/pull/2872
https://github.com/ManageIQ/manageiq-ui-classic/pull/2873
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/64ba0a3fc87674acc478ee844ef84838252885fa commit 64ba0a3fc87674acc478ee844ef84838252885fa Author: Adam Grare <agrare> AuthorDate: Wed Nov 29 14:34:35 2017 -0500 Commit: Adam Grare <agrare> CommitDate: Wed Nov 29 14:34:35 2017 -0500 Only show sockets and cores_per_socket if present On the container textual summary we were showing the sockets and cores_per_socket even if these were unset. https://bugzilla.redhat.com/show_bug.cgi?id=1514463 app/helpers/textual_mixins/textual_devices.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)
New commit detected on ManageIQ/manageiq-ui-classic/master: https://github.com/ManageIQ/manageiq-ui-classic/commit/8097e3c23bb3f9f823b73768b19cd5598d87e4fe commit 8097e3c23bb3f9f823b73768b19cd5598d87e4fe Author: Adam Grare <agrare> AuthorDate: Wed Nov 29 12:45:21 2017 -0500 Commit: Adam Grare <agrare> CommitDate: Wed Nov 29 14:27:39 2017 -0500 Fix CPU summary for VMs without cores_per_socket For VMs which do not set cpu_sockets or cpu_cores_per_socket we only want to show cpu_total_cores. There is a check for this already but since cpu_sockets has a default value of 1 (assuming for divide-by-zero issues) and cpu_total_cores is a virtual delegate with a default value of 1 this is always showing up as ' (1 Socket x 0 Cores)'. https://bugzilla.redhat.com/show_bug.cgi?id=1514463 app/helpers/vm_helper/textual_summary.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Okay all PRs have been merged! We now only show total cpus for SCVMM and fixed the UI to not show "8 (1 Socket x 0 Cores)"