Bug 1952502 - Inconsistent validation of pool creation by Rest API
Summary: Inconsistent validation of pool creation by Rest API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.6.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Arik
QA Contact: Polina
URL:
Whiteboard:
: 2055116 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 12:07 UTC by Polina
Modified: 2022-04-20 06:33 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-20 06:33:59 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.5?


Attachments (Terms of Use)
logs (678.51 KB, application/gzip)
2021-04-22 12:07 UTC, Polina
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 117498 0 master MERGED core: ensure non-cinder volumes of pool vms are set to qcow 2021-11-09 22:12:46 UTC

Description Polina 2021-04-22 12:07:35 UTC
Created attachment 1774467 [details]
logs

Created attachment 1774467 [details]
logs

Description of problem:
Rest API creation of the pool from a template with COW disks fails with "Thin provisioned template disks can not be defined as Raw" while the same pool creation is allowed in UI.
Rest API creation of a new VM from the same template is allowed.

Version-Release number of selected component (if applicable):
ovirt-engine-4.4.6.5-447.gd80dda7.9.el8ev.noarch

How reproducible:100%


Steps to Reproduce:
1. As a base I take a VM created from latest-rhel-guest-image-8.3-infra. 
   Add to the VM virtio_scsi disk, create template from the VM (this additional virtio_scsi disk is added as RAW format).

2. In UI we can create a pool from such a template. 
In rest API though it fails with validation error 'Cannot create VM-Pool. Thin provisioned template disks can not be defined as Raw.'

POST https://{{host}}/ovirt-engine/api/vmpools
<vm_pool>
    <name>pool_from_template_p</name>
    <size>2</size>
    <cluster>
        <name>golden_env_mixed_1</name>
        <description></description>
        <comment></comment>
        <ballooning_enabled>true</ballooning_enabled>
    </cluster>
    <template id="{{template_id}}"/>
    <vm/>
</vm_pool>

Actual results: error

Expected results: must be created if it is allowed in UI and if the new VM creation is allowed by rest API . 


Additional info:

Comment 1 Arik 2022-02-17 11:13:11 UTC
*** Bug 2055116 has been marked as a duplicate of this bug. ***

Comment 2 Polina 2022-03-20 10:19:52 UTC
verified on ovirt-engine-4.5.0.1-601.f26e9ea8cac5.3.el8ev.noarch according to the description

Comment 3 Sandro Bonazzola 2022-04-20 06:33:59 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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