Bug 1350708
| Summary: | Hot unplug disk using REST API returns "Internal Server Error" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine | Reporter: | Raz Tamir <ratamir> | ||||
| Component: | BLL.Storage | Assignee: | Tal Nisan <tnisan> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Raz Tamir <ratamir> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 4.0.0 | CC: | acanan, amureini, bugs, gklein, juan.hernandez, tnisan, ylavi | ||||
| Target Milestone: | ovirt-4.0.1 | Keywords: | Automation, Regression | ||||
| Target Release: | 4.0.1.1 | Flags: | rule-engine:
ovirt-4.0.z+
rule-engine: blocker+ tnisan: testing_plan_complete? ylavi: planning_ack+ tnisan: devel_ack+ acanan: testing_ack+ |
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-07-19 06:25:31 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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/ |
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: