Bug 1952502

Summary: Inconsistent validation of pool creation by Rest API
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.VirtAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.6.4CC: ahadas, bugs, harj.bo
Target Milestone: ovirt-4.5.0Flags: pm-rhel: ovirt-4.5?
Target Release: 4.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 06:33:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

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.