Created attachment 1173297 [details] engine and vdsm logs Description of problem: When trying to hot unplug vm's disk using REST API, I get: Status: 500 Reason: Internal Server Error Detail: [General command validation failure.] Version-Release number of selected component (if applicable): ovirt-engine-4.0.0.6-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. Create a VM with 1 disk with OS 2. Attache second disk to vm 3. Start the vm 4. send DELETE request to /api/vms/{vm:id}/disks/{disk:id} body: <action> <detach>true</detach> </action> Actual results: Expected results: Additional info:
It was tested with API v3
I think that the relevant log message is this one: ERROR [org.ovirt.engine.core.bll.storage.disk.DetachDiskFromVmCommand] (default task-8) [30d0c59c] Error during ValidateFailure.: java.lang.NullPointerException at org.ovirt.engine.core.bll.VmCommand.isDiskSupportedForPlugUnPlug(VmCommand.java:395) Apparently the code is assuming that "getDiskInterface" will always return something, but it returns null in this case: if (CollectionUtils.isEmpty(diskHotpluggableInterfaces) || !diskHotpluggableInterfaces.contains(diskVmElement.getDiskInterface().name())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED); } This may be related to the recent change that moves disk interface and bootable properties from the disk to the disk element. Tal, can you take a look, please?
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Verified on rhevm-4.0.2-0.2.rc1.el7ev.noarch
Since the problem described in this bug report should be resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a resolution of CURRENT RELEASE. For information on the release, and how to update to this release, follow the link below. If the solution does not work for you, open a new bug report. http://www.ovirt.org/release/4.0.1/