+++ This bug was initially created as a clone of Bug #1412725 +++ Description of problem: Trying to set the Custom Compatibility Version of a VM to an empty value via REST api (in order to take the Custom Compatibility Version value of the Cluster) is not supported, This should be done by running the following: POST /ovirt-engine/api/vms/<vmid> <vm> <custom_compatibility_version/> </vm> but it fails with an error: <detail> For correct usage, see: http://butterfly.usersys.redhat.com:8080/ovirt-engine/api/v4/model#services/vm-graphics-consoles/methods/add </detail> <reason>Request syntactically incorrect.</reason> Version-Release number of selected component (if applicable): 4.1 master How reproducible: 100% Steps to Reproduce: 1.Try to create a vm or edit a vm and set custom_compatibility_version attribute to an empty value: <vm> <custom_comaptibility_version/> </vm> Actual results: It failed with error: <detail> For correct usage, see: http://butterfly.usersys.redhat.com:8080/ovirt-engine/api/v4/model#services/vm-graphics-consoles/methods/add </detail> <reason>Request syntactically incorrect.</reason> Expected results: It should succeeded.
In rhevm-4.1.2.2-0.1.el7.noarch: vm_service.update( vm=types.Vm( custom_compatibility_version=types.Version() ) ) Results in: DEBUG:root:PUT /ovirt-engine/api/vms/f03206ec-475b-4a66-9309-d85e454aa8d5 HTTP/1.1 DEBUG:root:Content-Length: 45 DEBUG:root:<vm> DEBUG:root: <custom_compatibility_version/> DEBUG:root:</vm> DEBUG:root:upload completely sent off: 45 out of 45 bytes DEBUG:root:HTTP/1.1 400 Bad Request 2017-06-26 11:02:05,100+10 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-21) [] Operation Failed: [Cannot edit VM. Custom Compatibility Version is not supported: .] And "custom_compatibility_version=None" results in: DEBUG:root:<vm/> DEBUG:root:upload completely sent off: 6 out of 6 bytes DEBUG:root:HTTP/1.1 200 OK Which obviously is accepted but doesn't work. Also see: BZ #1367411 https://gerrit.ovirt.org/#/c/69984/
*** Bug 1412725 has been marked as a duplicate of this bug. ***
Verify with: engine: 4.1.5.1-0.1.el7 Steps: 1. Create VM 2. Set custom_compatibility_version from UI to 4.1 3. Update custom_compatibility_version to empty value from REST With: <vm> <custom_compatibility_version/> </vm> Results: PASS custom_compatibility_version updated to empty value.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:2509