Bug 1147870 - Internal Server Error (500) when exporting a LUN disk in the REST API
Summary: Internal Server Error (500) when exporting a LUN disk in the REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Vered Volansky
QA Contact: Carlos Mestre González
URL:
Whiteboard: storage
Depends On:
Blocks: 1147860
TreeView+ depends on / blocked
 
Reported: 2014-09-30 08:46 UTC by Idan Shaby
Modified: 2016-03-10 13:43 UTC (History)
10 users (show)

Fixed In Version: 3.6.0-12
Clone Of: 1147861
: 1147873 1147874 (view as bug list)
Environment:
Last Closed: 2015-11-04 11:21:44 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
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 Idan Shaby 2014-09-30 08:46:24 UTC
+++ This bug was initially created as a clone of Bug #1147861 +++

Description of problem:
When trying to export a LUN disk in the REST API, a "500 Internal Server Error" is returned.

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

How reproducible:
100%

Steps to Reproduce:
1. Create an external disk.
1. From the REST API, run a POST request with the next pattern:

URL
http://localhost:8080/api/disks/<DISK_ID>/export

BODY:
<action>
    <storage_domain id="<ANY_STORAGE_DOMAIN_ID>"/>
</action>


Actual results:
A "500 Internal Server Error" is returned.

Expected results:
An informative error message should be returned, or maybe we should even remove the export option for LUN disks in the REST API.

Additional info:

Comment 1 Vered Volansky 2015-08-02 07:56:33 UTC
engine log snippet:
2015-08-02 10:52:53,846 ERROR [org.ovirt.engine.core.bll.ExportRepoImageCommand] (default task-45) [1a8930ea] Error during CanDoActionFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.ExportRepoImageCommand.getPermissionCheckSubjects(ExportRepoImageCommand.java:149) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.isUserAuthorizedToRunAction(CommandBase.java:1044) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:787) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:368) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:475) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:457) [bll.jar:]
	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:413) [bll.jar:]

Comment 2 Carlos Mestre González 2015-09-22 10:58:18 UTC
<fault>
<reason>Operation Failed</reason>
<detail>
[Cannot export Virtual Machine Disk. Action is unsupported for the specified disk type (LUN).]
</detail>

version: 3.6.0-13

Comment 3 Sandro Bonazzola 2015-11-04 11:21:44 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.