Bug 1465786 - [REST-API] Creating disk using REST-API "ignore" the 'provisioned_size' field
[REST-API] Creating disk using REST-API "ignore" the 'provisioned_size' field
Status: CLOSED NOTABUG
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
4.2.0
Unspecified Unspecified
unspecified Severity high (vote)
: ---
: ---
Assigned To: Allon Mureinik
Raz Tamir
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-28 04:04 EDT by Eyal Shenitzky
Modified: 2017-06-28 04:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-28 04:37:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
engine and vdsm logs (545.24 KB, application/x-gzip)
2017-06-28 04:04 EDT, Eyal Shenitzky
no flags Details

  None (edit)
Description Eyal Shenitzky 2017-06-28 04:04:30 EDT
Created attachment 1292579 [details]
engine and vdsm logs

Description of problem:

When trying to create a disk using REST-API with provisional_size > 1 GB (10 GB for example),
The disk added successfully but in the GUI it shows the virtual size as less than 1 GB, while on REST the disk provisional_size shown as 10 GB.

REST-API command:
../ovirt-engine/api/disks:

<disk>	
    <description>rest_disk</description>
    <alias>rest_disk</alias>
    <bootable>false</bootable>
    <format>raw</format>
    <interface>virtio_scsi</interface>
    <provisioned_size>10</provisioned_size>
    <sparse>false</sparse>
    <storage_domains>
    	<storage_domain>
    		<name>iscsi_1</name>
    	</storage_domain>
    </storage_domains>
</disk>

Version-Release number of selected component (if applicable):
Engine - 4.2.0-0.0.master.20170624071949.gitff9611b.el7.centos
VDSM - 4.20.1-66.git228c7be.el7.centos.x86_64

Also, occurs on:
Engine - 4.1.3.5-0.1.el7
VDSM - 4.19.20-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create disk using REST-API with the following command

../ovirt-engine/api/disks:

<disk>	
    <description>rest_disk</description>
    <alias>rest_disk</alias>
    <bootable>false</bootable>
    <format>raw</format>
    <interface>virtio_scsi</interface>
    <provisioned_size>10</provisioned_size>
    <sparse>false</sparse>
    <storage_domains>
    	<storage_domain>
    		<name>iscsi_1</name>
    	</storage_domain>
    </storage_domains>
</disk>

Actual results:
Disk created successfully with virtual size < 1 GB

Expected results:
Disk should create successfully with virtual size < 10 GB


Additional info:
Engine and VDSM logs attached
Comment 1 Allon Mureinik 2017-06-28 04:37:01 EDT
All the sizes are in bytes, as stated in the documentation:

    /**
     * The virtual size of the disk, in bytes.
     *
     * This attribute is mandatory when creating a new disk.
     *
     * @author Juan Hernandez <juan.hernandez@redhat.com>
     * @author Megan Lewis <melewis@redhat.com>
     * @date 26 Apr 2017
     * @status updated_by_docs
     */
    Integer provisionedSize();

10 bytes is indeed <1GB.
Closing.

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