Bug 1128430 - NPE when attaching a non-existent disk to a VM
Summary: NPE when attaching a non-existent disk to a VM
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Maor
QA Contact: Elad
Whiteboard: storage
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-10 12:15 UTC by Allon Mureinik
Modified: 2016-02-10 19:43 UTC (History)
7 users (show)

Fixed In Version: ovirt-3.5.0_rc1.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-10-17 12:22:49 UTC
oVirt Team: Storage

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 31115 ovirt-engine-3.5 MERGED core: Set read only in the CDA instead the constructor Never

Description Allon Mureinik 2014-08-10 12:15:36 UTC
Description of problem:
When attempting to attach a non-existent disk to a VM the operation will fail with an NPE.

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

How reproducible:

Steps to Reproduce:
1. Use REST API to attach a non existent disk to a VM

Actual results:

Expected results:
CDA message explaining the disk does not exist.

Additional info:

Comment 1 Elad 2014-08-26 09:19:39 UTC
Tried to attach a non-existent disk to a VM.
I don't get NPE, but, a wrong error message is shown in the CDA:

2014-08-26 11:58:29,221 WARN  [org.ovirt.engine.core.bll.AttachDiskToVmCommand] (ajp-- [19e0cd33] CanDoAction of action AttachDiskToVm failed. Reasons:VAR__ACTION__ATTACH_ACTION_TO,VAR__TYPE__VM_D

REST request:

<disk id="0000068b-dba5-4118-8623-2e369eaad394">

REST response:

<reason>Operation Failed</reason>
<detail>[User is not authorized to perform this action.]</detail>

Opened a bug on this https://bugzilla.redhat.com/show_bug.cgi?id=1133841  , verifying this one.

Verified using ovirt-3.5 RC1.1

Comment 2 Sandro Bonazzola 2014-10-17 12:22:49 UTC
oVirt 3.5 has been released and should include the fix for this issue.

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