Bug 1012984

Summary: Host detail sub-tab: values of CPU Name and CPU Type are switched
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavel Novotny <pnovotny>
Component: ovirt-engine-webadmin-portalAssignee: Frantisek Kobzik <fkobzik>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: ecohen, iheim, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.0-alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1056586 (view as bug list) Environment:
Last Closed: 2015-02-17 08:29:30 UTC 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:
Bug Depends On:    
Bug Blocks: 1056586, 1142923, 1156165    
Attachments:
Description Flags
screenshot - host's General sub-tab none

Description Pavel Novotny 2013-09-27 13:49:55 UTC
Created attachment 803969 [details]
screenshot - host's General sub-tab

Description of problem:
The values of host CPU Name and CPU Type on the General sub-tab are obviously switched.
See attached screenshot.

Version-Release number of selected component (if applicable):
rhevm-3.3.0-0.23.master.el6ev.noarch (is16)

How reproducible:
100%

Steps to Reproduce:
1. Assuming we have host with CPU 'Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz', which belongs to the 'Intel Penryn Family'...
2. In the Hosts main tab, select the host, go to General sub-tab and check the values of CPU Name and CPU Type. 
3.

Actual results:
CPU Name: Intel Penryn Family
CPU Type: Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz

Expected results:
Exactly the opposite, i.e.,
CPU Name: Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz
CPU Type: Intel Penryn Family

Additional info:

This seems to be related only to Webadmin, REST API reports the CPU name correctly:
{{{
<cpu>
  <topology sockets="1" cores="4" threads="1"/>
  <name>Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz</name>
  ...
}}}

Comment 1 Frantisek Kobzik 2013-10-08 09:47:35 UTC
Guys, it seems that this bug reveals quite a lot of inconsistencies in the engine:

1, Inconsistency between Backend, Frontend and Restapi:
The backend field "VDS.cpuModel" (value e.g. "Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz") is called "type" in Host general subtab and "name" in restapi.

2, Inconsistency between Backend and Frontend:
The backend field "VDS.cpuName" (its type is ServerInfo (lol) and value e.g. "Intel Penryn Family") is called "name" in Host general subtab. 

3, Inconsistency in frontend - Clusters tab:
In this tab there is a column "Cluster CPU Type", its values looks like "Intel Penryn Family". (btw, in the code the method for retrieving this string is called "cpuNameCluster" and the column is called "cpuNameColumn" - another lol). 

...and we could go on.


Therefore I propose unifying the field names to be consistent to overcome confusion. For this I need to know what the right naming of following values should be:
1, "Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz" -> type, model, name?
2, "Intel Penryn Family" -> type, family?

ad 1, vdsm reports this value as "cpuModel", in /proc/cpuinfo this is reported as "name", dmidecode reports this as a "version" - obviously there are inconsistencies on system level as well. 

So could someone give me a pointer on how to name these things to make them unified?
Thanks.

Comment 2 Frantisek Kobzik 2013-10-11 11:36:42 UTC
I've just posted a patch that renames fields on frontend. See the commit msg if you're interested. In order to unify the naming on frontend level, I'll post another patch as a follow-up that unifies the naming also in the cluster view.

Comment 3 Frantisek Kobzik 2013-10-11 12:56:10 UTC
added patch for cluster views.

Comment 4 Pavel Novotny 2014-08-07 08:42:41 UTC
Verified in ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch (rc1).

CPU name/family naming:
Before - host -> General sub-tab:
  CPU Name: Intel Nehalem Family
  CPU Type: Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz

Now - host -> Hardware Information (*) sub-tab:
  CPU Model: Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz
  CPU Type: Intel Nehalem Family
(*) CPU info have been moved to HW Info sub-tab as part of bug 894084

Also label in new/edit cluster dialog has been updated: CPU Name -> CPU Type.

Comment 5 Omer Frenkel 2015-02-17 08:29:30 UTC
RHEV-M 3.5.0 has been released