Hide Forgot
Description of problem: Under 3.6, I had possibility to disable host-passthrough mode, with the request: <vm> <cpu> <mode>none</mode> </cpu> </vm>, if I try the same request under 4.0 with API version 3, I receive the error: <fault> <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> </fault> Version-Release number of selected component (if applicable): ovirt-engine-restapi-4.0.0-0.0.master.20160516171427.git0860aa2.el7.centos.noarch How reproducible: Always Steps to Reproduce: 1. Disable VM host-passthrough mode, with the request: <vm> <cpu> <mode>none</mode> </cpu> </vm> 2. 3. Actual results: <fault> <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> </fault> 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?
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?
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.
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".
sorry for late response, Roy would be able to answer better I guess you're right in comment #3
Verified on rhevm-4.0.0.4-0.1.el7ev.noarch PUT <vm> <cpu> <mode>none</mode> </cpu> </vm> Works fine under API version 3
oVirt 4.0.0 has been released, closing current release.