Hide Forgot
Created attachment 1146009 [details] engine and vdsm logs Description of problem: When trying to sending PUT request to /api/vms/{vm_id}/disks/{disk_id} <disk> <name>new_name</name> </disk> and the disk_id belongs to direct lun, the returned status is 500 Internal Server Error. From engine.log: 2016-04-11 17:39:47,901 ERROR [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper] (ajp-/127.0.0.1:8702-1) [] Mapping exception while processing "PUT" request for path "/vms/72bd56eb-470d-40a8-940a-06bd0ee36ea0/disks/54cb9a3a-12e0-4f95-94bd-6b787f479322" 2016-04-11 17:39:47,902 ERROR [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper] (ajp-/127.0.0.1:8702-1) [] Exception: org.ovirt.engine.api.restapi.utils.MappingException: java.lang.reflect.InvocationTargetException For non direct lun the request working fine Version-Release number of selected component (if applicable): rhevm-3.6.5.1-0.1.el6.noarch vdsm-4.17.25-0.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. Create a direct lun disk 2. Attach it to vm 3. Try to update it using REST API Actual results: The returned status is 500 Internal Server Error. Expected results: Additional info:
The error comes from the rest API layer, adjusting component accordingly. What happens here is since the incoming disk does not have a lun storage section the mapper (wrongly) attempts to treat it as a DiskImage, and, of course, fails. The solution should be to treat the incoming disk as lun if either it on the existing engine disk could be identified as LUN disks. I've successfully reproduced the issue on the current master (commit 6abe9f037b842681e06c5fc550bad8d82344394c), patch in the works.
Verification is blocked because bug https://bugzilla.redhat.com/show_bug.cgi?id=1346752
Verified on rhevm-4.0.2-0.2.rc1.el7ev.noarch
oVirt 4.0.0 has been released, closing current release.