Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1168525 - Set disk_profile or storagedomain parameter required for add disk operation
Summary: Set disk_profile or storagedomain parameter required for add disk operation
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5.0
Assignee: Gilad Chaplik
QA Contact: Lukas Svaty
Whiteboard: sla
: 1162756 (view as bug list)
Depends On:
Blocks: rhev35rcblocker rhev35gablocker
TreeView+ depends on / blocked
Reported: 2014-11-27 08:50 UTC by Ondra Machacek
Modified: 2016-02-10 20:18 UTC (History)
14 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.0-23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-17 17:17:08 UTC
oVirt Team: SLA
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
oVirt gerrit 35719 master MERGED core: NPE when adding detached disk without SD Never
oVirt gerrit 35750 ovirt-engine-3.5 MERGED core: NPE when adding detached disk without SD Never

Description Ondra Machacek 2014-11-27 08:50:16 UTC
Description of problem:

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

How reproducible:

Steps to Reproduce:
curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -H "Filter: $filter" -u $U -d "<disk><interface>virtio</interface><format>cow</format><size>1073741824</size><alias>auto_delete_disk</alias></disk>" $URL/disks

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reason>Operation Failed</reason>
    <detail>[General command validation failure.]</detail>

Expected results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reason>Incomplete parameters</reason>
    <detail>Disk [disk_profile] required for add</detail>

Additional info:
2014-11-27 09:42:57,465 ERROR [org.ovirt.engine.core.bll.AddDiskCommand] (ajp-/ [79b27bac] Error during CanDoActionFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.AddDiskCommand.setAndValidateDiskProfiles( [bll.jar:]
	at org.ovirt.engine.core.bll.AddDiskCommand.canDoAction( [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction( [bll.jar:]

Comment 1 Juan Hernández 2014-11-27 09:09:12 UTC
This looks like a duplicate of or closely related to bug 1160846. The difference is that in this case you are trying to add a disk without attaching it to a VM, but the root cause is probably the same. I think this (and also bug 1160846) should block the release.

Comment 2 Gilad Chaplik 2014-11-30 13:44:42 UTC
The issue here that floating disk's storage domain wasn't specified. that revealed the NPE.

Comment 3 Allon Mureinik 2014-12-09 12:33:44 UTC
*** Bug 1162756 has been marked as a duplicate of this bug. ***

Comment 4 Lukas Svaty 2014-12-22 11:21:54 UTC
verified in av13.4

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reason>Operation Failed</reason>
    <detail>[Cannot add Virtual Machine Disk. Storage Domain hasn't been specified.]</detail>

Comment 5 Eyal Edri 2015-02-17 17:17:08 UTC
rhev 3.5.0 was released. closing.

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