Bug 1326003 - Can't update direct lun using the API
Summary: Can't update direct lun using the API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.6.5.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.0.0-beta
: 4.0.0
Assignee: Allon Mureinik
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-11 14:46 UTC by Raz Tamir
Modified: 2016-07-05 07:45 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-05 07:45:18 UTC
oVirt Team: Storage
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+


Attachments (Terms of Use)
engine and vdsm logs (827.77 KB, application/x-gzip)
2016-04-11 14:46 UTC, Raz Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 55997 0 master MERGED restapi: Identify LUN engine disk 2016-04-14 09:02:57 UTC

Description Raz Tamir 2016-04-11 14:46:59 UTC
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:

Comment 1 Allon Mureinik 2016-04-11 16:36:25 UTC
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.

Comment 2 Raz Tamir 2016-06-15 20:04:20 UTC
Verification is blocked because bug https://bugzilla.redhat.com/show_bug.cgi?id=1346752

Comment 3 Raz Tamir 2016-07-03 11:20:17 UTC
Verified on rhevm-4.0.2-0.2.rc1.el7ev.noarch

Comment 4 Sandro Bonazzola 2016-07-05 07:45:18 UTC
oVirt 4.0.0 has been released, closing current release.


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