Bug 1126425 - NPE when moving a LUN disk in REST API
Summary: NPE when moving a LUN disk in REST API
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.4.4
Hardware: Unspecified
OS: Unspecified
low vote
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Vered Volansky
QA Contact: Carlos Mestre González
Whiteboard: storage
Depends On:
Blocks: 1147860 1288366
TreeView+ depends on / blocked
Reported: 2014-08-04 12:14 UTC by Vered Volansky
Modified: 2019-09-12 08:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1288366 (view as bug list)
Last Closed: 2015-11-04 11:29:25 UTC
oVirt Team: Storage
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 45361 0 master MERGED core: Avoid NPEs on illegal LUN disk operations Never
oVirt gerrit 45776 0 ovirt-engine-3.6 MERGED core: Avoid NPEs on illegal LUN disk operations Never
oVirt gerrit 45805 0 master MERGED webadmin: imageGroupId passed to parameters Never

Description Vered Volansky 2014-08-04 12:14:55 UTC
Description of problem:
When moving a LUN disk attached to a VM using REST API - getting NPE.
The same scenario with a floating disk should also result in an NPE, as well as copy disk.

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

How reproducible:

Steps to Reproduce:
1. Move a LUN disk, example:

    <storage_domain id="7158eae9-4886-4af7-af0b-d668ecee9e4f"/>
2. NPE

Actual results:

Expected results:
CDA message

Additional info:
There was always an NPE in this unreasonable scenario.

Both try to extract guid from imageId, which is null:
Guid imageId = asGuid(getDisk().getImageId()); //(BackendVmDiskResource)
Guid imageId = asGuid(get().getImageId()); //(BackendDiskResource X 2)

Comment 1 Allon Mureinik 2014-08-27 17:00:53 UTC
The operation should fail in any event, just with a better error than NPE. Pushing out to 3.5.1

Comment 2 Allon Mureinik 2014-09-18 10:21:22 UTC
This requires moving around a LOT of code, for a small benefit.
Pushing out to 3.6.0.

Idan - please create a tracker and open bugs for the similar issues we have in other Disks actions.

Comment 3 Idan Shaby 2014-09-30 08:59:31 UTC
Tracking - Bug 1147860.

VM LUN disks:
Export - Bug 1147861.
Move - Bug 1147863.

LUN disks:
Export - Bug 1147870
Move - Bug 1147873
Copy - Bug 1147874

Comment 4 Carlos Mestre González 2015-09-22 10:59:28 UTC
<reason>Operation Failed</reason>
[Cannot move Virtual Machine Disk. Action is unsupported for the specified disk type (LUN).]

version: 3.6.0-13

Comment 5 Sandro Bonazzola 2015-11-04 11:29:25 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.

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