Bug 1362464 - REST-API v4 is ignoring disk attributes requested when thin cloning a vm from a template
Summary: REST-API v4 is ignoring disk attributes requested when thin cloning a vm from...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.0.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.0.6
: 4.0.6
Assignee: Tal Nisan
QA Contact: Carlos Mestre González
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 09:18 UTC by Carlos Mestre González
Modified: 2017-01-18 07:28 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:28:31 UTC
oVirt Team: Storage
Embargoed:
tnisan: ovirt-4.0.z?
amureini: exception?
rule-engine: planning_ack?
tnisan: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 66050 0 master POST core: Fail validation when creating a thin VM with non QCOW disks 2016-11-06 11:26:44 UTC
oVirt gerrit 66121 0 ovirt-engine-4.0 MERGED core: Fail validation when creating a thin VM with non QCOW disks 2016-11-08 13:49:22 UTC

Description Carlos Mestre González 2016-08-02 09:18:03 UTC
Description of problem:
When trying to create a vm from a template with QCOW disks (created from a vm with raw and cow disks) without clone (thin), the operation succeeds, creating the disks but not matching the disk format set in the request.

In the Web UI the operation is blocked since you can only set the disks to RAW once you select clone, but in REST it allows the operation and creates the disks.


Version-Release number of selected component (if applicable):
rhevm-4.0.2-0.1.rc.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create a vm with a cow sparse and raw no sparse disk
2. Create a template from the VM with COW format (QCOW) disks
3. Create a vm from the previous template with the REST API without clone selecting the disks as RAW:
<vm>
      <name>template_manual_rest_raw_no_clone2</name>
      <cluster><name>golden_env_mixed_1</name></cluster>

        <disk_attachments>
        <disk_attachment>
            <interface>virtio</interface>
            <disk id="22d677b6-302a-4b94-8b49-e44932861510">
                <format>raw</format>
          </disk>
     </disk_attachment>
             <disk_attachment>
            <interface>virtio</interface>
            <disk id="0f7e5f74-c1c5-466a-93a7-b1e0ec2eb1f5">
                <format>raw</format>
           </disk>
           </disk_attachment>
    </disk_attachments>
    <template><name>vm_TestCase16408_REST_NFS_28170411</name></template>
</vm>

Actual results:
Operation succeeds, creating a vm with two disks, one RAW and one COW (the requested asked for both being RAW)

In the Web UI this operation is not allowed, only you're able to create the template when you mark it as clone.

Expected results:
Error stating that the request cannot be fulfil.

Additional info:

Comment 1 Yaniv Lavi 2016-09-11 18:55:28 UTC
Is this v3 or v4 API?

Comment 2 Carlos Mestre González 2016-09-12 10:50:14 UTC
V4

Comment 3 Carlos Mestre González 2016-11-22 10:38:13 UTC
Creating the vm shows an error message: 

<fault>
<detail>
[Cannot add VM. Thin provisioned template disks can not be defined as Raw.]
</detail>
<reason>Operation Failed</reason>
</fault>


rhevm-4.0.6-0.1.el7ev.noarch


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