Bug 1666593 - Deleting a disk of RHV vm via API throws a 405 error in the response
Summary: Deleting a disk of RHV vm via API throws a 405 error in the response
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: Boriso
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1620161 1687846
TreeView+ depends on / blocked
 
Reported: 2019-01-16 06:41 UTC by Parthvi Vala
Modified: 2019-12-13 15:16 UTC (History)
13 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1687846 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:16:36 UTC
Category: Bug
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Parthvi Vala 2019-01-16 06:41:08 UTC
Description of problem:
Deleting a disk of RHV VM via API throws an error `Error: HTTP response code is 405. The response body is empty.` in the response.

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

How reproducible:
Always

Steps to Reproduce:
1. Create an RHV VM.
2. Add a disk to the VM.
3. Send an API request to delete the disk from VM.
POST /api/requests
Query: {
    "action"  :"create",
    "options" : {
                  "src_ids" : [
                                ":vm_id"
                               ],
                  "request_type" : "vm_reconfigure",
                  "disk_remove" : [
                                    {   
                                     "disk_name"      : ":disk_id",
                                     "delete_backing" : false
                                    }
                                   ]
                 },
    "auto_approve" : false
}
Actual results:
Request results in error - `Error: HTTP response code is 405. The response body is empty.`
Disk is not deleted from the VM.

Expected results:
The request must be completed successfully, and disk must be deleted from the VM.

Additional info:
No matter what the VM power state is, the request always results in the same error.

Comment 2 Parthvi Vala 2019-01-16 08:29:25 UTC
This issue is definitely not a regression, I checked on 5.8 and 5.9, and the issue exists there as well.

Comment 5 Parthvi Vala 2019-01-22 09:42:27 UTC
Update:
This feature was working until 5.9.4.7.

Adding `regression`.

Comment 9 Parthvi Vala 2019-01-25 05:48:45 UTC
Canceling the needinfo for now.

Comment 12 CFME Bot 2019-03-11 14:03:32 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:

https://github.com/ManageIQ/manageiq-providers-ovirt/commit/70f427f8bfb2837c2354ffd06f6779bd11ec577f
commit 70f427f8bfb2837c2354ffd06f6779bd11ec577f
Author:     Boris Odnopozov <boris.od>
AuthorDate: Sun Mar 10 09:02:19 2019 -0400
Commit:     Boris Odnopozov <boris.od>
CommitDate: Sun Mar 10 09:02:19 2019 -0400

    Fix deleting a disk from VM

    Removing a disk was not handled correctly

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1666593

 app/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4.rb | 12 +-
 spec/models/manageiq/providers/redhat/infra_manager/ovirt_services/strategies/v4_spec.rb | 45 +-
 2 files changed, 54 insertions(+), 3 deletions(-)

Comment 16 Parthvi Vala 2019-05-05 10:08:38 UTC
Considering Boris's comment on https://bugzilla.redhat.com/show_bug.cgi?id=1691635#c7, the disk GUID instead of disk name is intended as disks in a RHV VM can have non-unique names and since this fix fixes the problem, moving this BZ to Verified and cancelling needinfo.

FIXED. Verified on 5.11.0.2.20190430174828_0e34dea.


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