Bug 1337181

Summary: Disable VM host-host-passthrough mode not save on backward compatibility to API version 3
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, michal.skrivanek, mperina, rgolan
Target Milestone: ovirt-4.0.0-rcKeywords: Regression, Triaged
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:46:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Artyom 2016-05-18 12:33:22 UTC
Description of problem:
Under 3.6, I had possibility to disable host-passthrough mode, with the request:
if I try the same request under 4.0 with API version 3, I receive the error:
<detail>The string 'host-model' isn't a valid value for the 'CpuMode' enumerated type. Valid values are: 'custom', 'host-model', 'host-passthrough'.</detail>
<reason>Invalid value</reason>

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Disable VM host-passthrough mode, with the request:

Actual results:
<detail>The string 'host-model' isn't a valid value for the 'CpuMode' enumerated type. Valid values are: 'custom', 'host-model', 'host-passthrough'.</detail>
<reason>Invalid value</reason>

Expected results:
Request must succeed, and disable VM host-passthrough mode 

Additional info:
Also, I do not really understand why we have such error message, VM host-passthrough mode or enabled or disabled, what is host-model mode?

Comment 1 Juan Hernández 2016-05-18 18:20:58 UTC
The value "none" wasn't never a valid value for that parameter, but the in 3.6 we happened to ignore any non-recognized value, which is wrong. Version 4 the engine is more strict in these regards, it rejects any value that isn't valid, thus the error message.

To solve this issue we will modify the V3 to V4 translation layer so that unrecognized values of this specific parameter are ignored. But if "none" should be a valid value then it should be added to the "CpuMode" enum in the specification of the API, and handled correctly. Michal, should we add "none" as a valid value?

Comment 2 Red Hat Bugzilla Rules Engine 2016-05-18 18:21:04 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 3 Juan Hernández 2016-05-18 19:05:59 UTC
Regarding the meaning of the values, according to the code "host_passthrough" means enable passthrough. The two others, both "custom" and "host_model", mean exactly the same: disable passthrough. I don't know if they had any other meaning in the past, but at the moment I'd say that we should probably remove "custom" and "host_model" and replace it them with "none".

Comment 4 Michal Skrivanek 2016-05-23 08:21:54 UTC
sorry for late response, Roy would be able to answer better I guess you're right in comment #3

Comment 5 Artyom 2016-06-22 14:01:13 UTC
Verified on rhevm-


Works fine under API version 3

Comment 6 Sandro Bonazzola 2016-07-05 07:46:06 UTC
oVirt 4.0.0 has been released, closing current release.