Bug 1449289 - RESTAPI - Amend (update VM disk attachment disk qcow2_v3 field) to raw disk is allowed
Summary: RESTAPI - Amend (update VM disk attachment disk qcow2_v3 field) to raw disk i...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.1.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.1.3
: 4.1.3.1
Assignee: Maor
QA Contact: Avihai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-09 14:22 UTC by Avihai
Modified: 2017-07-06 13:22 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:22:30 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
engine & vdsm logs (1.47 MB, application/x-gzip)
2017-05-09 14:22 UTC, Avihai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76816 0 master MERGED core: Add validation for amend of RAW disk. 2017-05-25 07:36:34 UTC
oVirt gerrit 77308 0 ovirt-engine-4.1 MERGED core: Add validation for amend of RAW disk. 2017-05-25 08:56:44 UTC

Description Avihai 2017-05-09 14:22:02 UTC
Created attachment 1277391 [details]
engine & vdsm logs

Description of problem:
Amend (update VM disk attachment disk qcow2_v3 field) to raw disk is allowed.

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

How reproducible:
100%

Steps to Reproduce:
1.Create VM with RAW disk
2.Via RESTAPI amend disk


Actual results:
The response is successful & event log shows an update is successful.

Event log:
May 9, 2017, 4:54:49 PM 
VM vm_TestCase18349_REST_NFS_0916144083 vm_TestCase18349_REST_NFS_0916144083_Disk1 disk was updated by admin@internal-authz.

Expected results:
I would expect that update qcow2_v3 to VM disk attachment on a RAW disk that does not have this field will fail with a reasonable error.

Additional info:
RESTAPI amend request:

URL:
https://storage-ge-04.scl.lab.tlv.redhat.com/ovirt-engine/api/vms/cee54bba-c327-4e34-9482-6d77781d8627/diskattachments/dd39bbc5-fd3d-4c7b-ba3f-6e9c640ead22

Body:
<disk_attachment>
    <disk>
        <qcow_version>qcow2_v3</qcow_version>
    </disk>
</disk_attachment>

Comment 1 Maor 2017-05-24 14:15:38 UTC
The following validation message will be presented to the user once the QCOW version is changed for a disk without any QCOW volumes:

  "Cannot ${action} ${type}. The amend operation does not support disk without any QCOW2 volumes."

A user might still see a successful response through REST even if no change has been done on the disk, this is the current behavior through REST (For example update the disk alias/description with the same value or amend a disk to the same QCOW version)

Comment 2 rhev-integ 2017-05-28 14:46:15 UTC
INFO: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Tag 'ovirt-engine-4.1.3' doesn't contain patch 'https://gerrit.ovirt.org/77308']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.1.3

For more info please contact: infra

Comment 3 Maor 2017-06-06 12:04:37 UTC
As mentioned in comment 2
patch https://gerrit.ovirt.org/77308 was not part of ovirt-engine-4.1.3 tag, therefore it should not be moved to ON_QA for target 4.1.3, moving again to modified until next build of 4.1.4.

Comment 4 Allon Mureinik 2017-06-20 10:00:37 UTC
(In reply to Maor from comment #3)
> As mentioned in comment 2
> patch https://gerrit.ovirt.org/77308 was not part of ovirt-engine-4.1.3 tag,
> therefore it should not be moved to ON_QA for target 4.1.3, moving again to
> modified until next build of 4.1.4.

It's part of the ovirt-engine-4.1.3.1 resping. Moving back to 4.1.3 and setting ON_QA.

Comment 5 Avihai 2017-06-20 16:22:32 UTC
verified on 4.1.3.4


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