Bug 1168525

Summary: Set disk_profile or storagedomain parameter required for add disk operation
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engine-restapiAssignee: Gilad Chaplik <gchaplik>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aberezin, bazulay, dfediuck, ebenahar, ecohen, gklein, iheim, juan.hernandez, lsurette, mavital, rbalakri, rgolan, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Regression
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: org.ovirt.engine-root-3.5.0-23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 17:17:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1164308, 1164311    

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


Version-Release number of selected component (if applicable):
rhevm-restapi-3.5.0-0.21.el6ev.noarch

How reproducible:
always

Steps to Reproduce:
1.
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"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[General command validation failure.]</detail>
</fault>

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

Additional info:
2014-11-27 09:42:57,465 ERROR [org.ovirt.engine.core.bll.AddDiskCommand] (ajp-/127.0.0.1:8702-14) [79b27bac] Error during CanDoActionFailure.: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.AddDiskCommand.setAndValidateDiskProfiles(AddDiskCommand.java:600) [bll.jar:]
	at org.ovirt.engine.core.bll.AddDiskCommand.canDoAction(AddDiskCommand.java:121) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:755) [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"?>
<fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot add Virtual Machine Disk. Storage Domain hasn't been specified.]</detail>
</fault>

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