Bug 1408584 - [RFE] Host cpu type is not found anywhere in REST API
Summary: [RFE] Host cpu type is not found anywhere in REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.3.0
: ---
Assignee: Steven Rosenberg
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-25 12:06 UTC by sefi litmanovich
Modified: 2019-02-21 06:50 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.3.0_rc
Doc Type: Enhancement
Doc Text:
Previously the REST API did not include the CPU Type when it returned information about the host. Now, the CPU Type is included with the rest of the information concerning the host that the REST API returns, which is consistent with the Administration Portal.
Clone Of:
Environment:
Last Closed: 2019-02-13 07:46:37 UTC
oVirt Team: Virt
Embargoed:
rbarry: ovirt-4.3?
rule-engine: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 95855 0 master MERGED restapi: Added Host CPU Type to REST API 2018-11-29 14:08:52 UTC

Description sefi litmanovich 2016-12-25 12:06:26 UTC
Description of problem:
The host cpu type can be found in UI under the Hosts tab -> General sub-tab - Hardware sub-tab and specifies the specific cpu model which is used on the host e.g. Intel Conroe Family.
In REST API this value is nowhere to be found. It doesn't exist under the host's cpu or hardware_information or os attributes, not with All-content flag set to True as well.
Could be nice to add it.

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.2.master.20161218144454.gitbaa2853.el7.centos.noarch

How reproducible:
always

Steps to Reproduce:
1. Install some host in rhevm.
2.
3.

Actual results:
The host cpu type can be found in UI but not in REST API

Expected results:
cpu type exist as a sub attribute of host's cpu or harware_information attributes in REST API.

Additional info:

Comment 1 Yaniv Kaul 2016-12-26 08:32:46 UTC
Was it there in the past?
'Could be nice to add it' sounds like a RFE to me?

Comment 2 Juan Hernández 2016-12-26 09:43:06 UTC
I see this using latest master and version 4 of the API:

  <cpu>
    <name>Intel Core Processor (Skylake)</name>
    <speed>2808</speed>
    <topology>
      <cores>1</cores>
      <sockets>1</sockets>
      <threads>1</threads>
    </topology>
  </cpu>

Also with version 3 of the API, but a bit different:

  <cpu>
    <topology sockets="1" cores="1" threads="1"/>
    <name>Intel Core Processor (Skylake)</name>
    <speed>2808</speed>
  </cpu>

Is that what you are looking for? Isn't it reported in your environment?

Note also that there is an small chance that the information isn't reported, if the GetCapabilities VDS command hasn't been executed for that host yet.

Comment 3 sefi litmanovich 2016-12-27 09:52:41 UTC
(In reply to Juan Hernández from comment #2)
> I see this using latest master and version 4 of the API:
> 
>   <cpu>
>     <name>Intel Core Processor (Skylake)</name>
>     <speed>2808</speed>
>     <topology>
>       <cores>1</cores>
>       <sockets>1</sockets>
>       <threads>1</threads>
>     </topology>
>   </cpu>
> 
> Also with version 3 of the API, but a bit different:
> 
>   <cpu>
>     <topology sockets="1" cores="1" threads="1"/>
>     <name>Intel Core Processor (Skylake)</name>
>     <speed>2808</speed>
>   </cpu>
> 
> Is that what you are looking for? Isn't it reported in your environment?
> 
> Note also that there is an small chance that the information isn't reported,
> if the GetCapabilities VDS command hasn't been executed for that host yet.

I have a setup with 4 hosts, I refreshed capabilities as well. I think the thing is that on some cpus the name includes the type but for some it doesn't. I Have 2 Opeteron G1 hosts, 1 penryn and 1 sandyBridge. What I see in api under <cpu><name> is:

<name>Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz</name>
<name>Intel(R) Xeon(R) CPU E3-1280 V2 @ 3.60GHz</name>
<name>AMD Opteron(tm) Processor 4170 HE</name>
<name>AMD Opteron(tm) Processor 4170 HE</name>

These values corresponds to the cpuModel value that is returned in getVdsCaps cmd, but the thing is that there is some inconsistencies in the system in all that concerns cpu type values.
e.g. in cluster the value would be 'Intel Conroe Family', on vm level (if you want to pass custom_cpu_model e.g.) it would be 'intel_Conroe' or just 'Conroe'.
Maybe we can add another sub-attribute that specifies the model family, or passes the highest model from cpuFlags list?

I will change the bug to an RFE as Yaniv suggests.

Comment 4 Ryan Barry 2018-11-06 23:03:13 UTC
Targeting this due to the CPU deprecations

Comment 9 Steven Rosenberg 2018-11-29 13:09:40 UTC
The CPU Type has now been added to the REST API's cpu section:

<cpu>
<name>Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz</name>
<speed>3900</speed>
<topology>
<cores>4</cores>
<sockets>1</sockets>
<threads>2</threads>
</topology>
<type>Intel Haswell-noTSX IBRS SSBD Family</type>
</cpu>

Comment 10 Petr Matyáš 2018-12-11 12:13:15 UTC
Verified on ovirt-engine-4.3.0-0.6.alpha2.el7.noarch

Comment 11 Sandro Bonazzola 2019-02-13 07:46:37 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 12 Steve Goodman 2019-02-20 15:25:03 UTC
Steven, I edited the doc text. Is this accurate:

Previously the REST API did not include the CPU Type when it returned information about the host. Now, the CPU Type is part of the information about the host that the REST API returns, consistent with the Administration Portal.

Comment 13 Steven Rosenberg 2019-02-20 16:04:49 UTC
It is OK, I might say: 

Now, the CPU Type is included with the rest of the information concerning the host that the REST API returns which is consistent with the Administration Portal.


Note You need to log in before you can comment on or make changes to this bug.