Bug 1303993 - [ppc64][restapi] Add cluster with Power 8 cpu type fail
Summary: [ppc64][restapi] Add cluster with Power 8 cpu type fail
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 3.6.2
Hardware: ppc64
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.3
: ---
Assignee: Tomas Jelinek
QA Contact: Ilanit Stein
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-02 16:07 UTC by Ilanit Stein
Modified: 2016-02-21 07:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-04 10:35:23 UTC
oVirt Team: Virt
Embargoed:
tjelinek: ovirt-3.6.z?
rule-engine: blocker?
istein: planning_ack?
istein: devel_ack?
istein: testing_ack?


Attachments (Terms of Use)

Description Ilanit Stein 2016-02-02 16:07:14 UTC
Description of problem:
Add cluster with cpu type "IBM POWER 8" via RESTAPI fail on Operation failed.
Same operation via webAdmin succeed.

RESTAPI Request:
=============== 
Custom header: Content-Type: application/xml
POST
https://<engine fqdn>:443/ovirt-engine/api/clusters

<cluster>
    <name>istein1</name>
    <cpu id="IBM POWER 8"/>
    <data_center href="/api/datacenters/06e2ae3d-de68-4e1b-8643-57c926e3bbe9" id="06e2ae3d-de68-4e1b-8643-57c926e3bbe9">
        <name>istein</name>
        <local>false</local>
        <version major="3" minor="6"/>
        <supported_versions>
            <version major="3" minor="6"/>
        </supported_versions>
        <quota_mode>disabled</quota_mode>
    </data_center>
    <version major="3" minor="6"/>
</cluster>

Response:
========
 400 Bad Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot create Cluster. The chosen CPU is not supported.]</detail>
</fault>

Version-Release number of selected component (if applicable):
rhevm 3.6.3-0.1.el6

How reproducible:
100%

Steps to Reproduce:
1. Created a DC (storage type: shared, compatibility version 3.6, Quota mode), via the webAdmin, for example. 
2. Create a cluster via RESTAPI same as the request described above

Comment 2 Tomas Jelinek 2016-02-03 10:18:44 UTC
The <cpu id="... must correspond to the one defined in vdc_options. In this case it has to be "IBM POWER8" (e.g. without the space before the '8'). 

Does it work if you try it like this?

Comment 3 Ilanit Stein 2016-02-03 13:20:39 UTC
reply to comment 1:

It is regression as the rhevm env I am working on, contains active DCs and clusters, that were added via RESTAPI, about 2 month ago.

reply to comment 2:
Even when using "IBM POWER8" instead of "IBM POWER 8" still fails:
 
Using values from vdc_options ServerCPUList [1]:
-  <cpu id="IBM POWER8"/>           => fail same as in the bug description
-  <cpu id="Intel Conroe Family"/>  => succeed to add cluster

[1]
ServerCPUList   
 3:Intel Conroe Family:vmx,nx,model_Conro
e:Conroe:x86_64; 4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem Family:vmx,nx,
model_Nehalem:Nehalem:x86_64; 6:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel
 SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel Haswell Family:vmx,nx,model_Has
well:Haswell:x86_64; 2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron G2:svm,nx
,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD O
pteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5
:x86_64; 3:IBM POWER8:powernv,model_power8:power8:ppc64;

Comment 4 Yaniv Kaul 2016-02-03 13:24:34 UTC
Ilanit - anything in the engine.log? (why is it not attached?)

Comment 5 Tomas Jelinek 2016-02-03 16:17:06 UTC
The problem is that https://bugzilla.redhat.com/show_bug.cgi?id=1248867 seems to be partially incorrect. The part which updates the existing engine_config for 3.6 did not work due to incorrectly set default value for the fn_db_update_default_config_value() so it is still "IBM POWER 8".

And sending "IBM POWER 8" using REST does not work because there is a code which translates this to "IBM POWER8" on the API layer.

Comment 6 Red Hat Bugzilla Rules Engine 2016-02-03 16:17:08 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 7 Red Hat Bugzilla Rules Engine 2016-02-03 16:18:35 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 8 Ilanit Stein 2016-02-03 16:42:27 UTC
Engine.log relevant part:

2016-02-03 17:52:14,985 WARN  [org.ovirt.engine.core.bll.AddVdsGroupCommand] (ajp-/127.0.0.1:8702-6) [3ace3ea8] CanDoAction of action 'AddVdsGroup' failed for user admin@internal. Reasons: VAR__TYPE__CLUSTER,VAR__ACTION__CREATE,ACTION_TYPE_FAILED_CPU_NOT_FOUND
2016-02-03 17:52:14,986 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-6) [] Operation Failed: [Cannot create Cluster. The chosen CPU is not supported.]
2016-02-03 17:52:15,020 INFO  [org.ovirt.engine.core.bll.aaa.LogoutSessionCommand] (ajp-/127.0.0.1:8702-6) [2d17a222] Running command: LogoutSessionCommand internal: false.
2016-02-03 17:52:15,028 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-6) [2d17a222] Correlation ID: 2d17a222, Call Stack: null, Custom Event ID: -1, Message: User admin@internal logged out.

Comment 9 Tomas Jelinek 2016-02-04 10:35:23 UTC
It is fixed for 4.0 and works for fresh install of 3.6.3.
For upgrade from 3.6.2 use a workaround to change the 'IBM POWER 8' to 'IBM POWER8' in the vdc_options table for the ServerCPUList for version 3.6. You can use a query like this:

update vdc_options set option_value = '3:Intel Conroe Family:vmx,nx,model_Conroe:Conroe:x86_64; 4:Intel Penryn Family:vmx,nx,model_Penryn:Penryn:x86_64; 5:Intel Nehalem Family:vmx,nx,model_Nehalem:Nehalem:x86_64; 6:Intel Westmere Family:aes,vmx,nx,model_Westmere:Westmere:x86_64; 7:Intel SandyBridge Family:vmx,nx,model_SandyBridge:SandyBridge:x86_64; 8:Intel Haswell-noTSX Family:vmx,nx,model_Haswell-noTSX:Haswell-noTSX:x86_64; 9:Intel Haswell Family:vmx,nx,model_Haswell:Haswell:x86_64; 10:Intel Broadwell-noTSX Family:vmx,nx,model_Broadwell-noTSX:Broadwell-noTSX:x86_64; 11:Intel Broadwell Family:vmx,nx,model_Broadwell:Broadwell:x86_64; 2:AMD Opteron G1:svm,nx,model_Opteron_G1:Opteron_G1:x86_64; 3:AMD Opteron G2:svm,nx,model_Opteron_G2:Opteron_G2:x86_64; 4:AMD Opteron G3:svm,nx,model_Opteron_G3:Opteron_G3:x86_64; 5:AMD Opteron G4:svm,nx,model_Opteron_G4:Opteron_G4:x86_64; 6:AMD Opteron G5:svm,nx,model_Opteron_G5:Opteron_G5:x86_64; 3:IBM POWER8:powernv,model_POWER8:POWER8:ppc64;' where option_name = 'ServerCPUList' and version = '3.6'

Comment 10 Ilanit Stein 2016-02-21 07:27:38 UTC
Verified on 3.6.1-0.1

(While using automation to build PPC testing rhevm environment from new, including add cluster, via REST API).


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