Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2108012

Summary: Disk convert from sparse to preallocated doesn't work
Product: [oVirt] ovirt-engine Reporter: sshmulev
Component: BLL.StorageAssignee: Benny Zlotnik <bzlotnik>
Status: CLOSED CURRENTRELEASE QA Contact: sshmulev
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5.2CC: ahadas, bugs, dfodor, sfishbai
Target Milestone: ovirt-4.5.2Keywords: Automation, Regression, ZStream
Target Release: ---Flags: pm-rhel: ovirt-4.5?
pm-rhel: blocker?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-30 08:47:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sshmulev 2022-07-18 09:40:44 UTC
Description of problem:
convert disk from  Cow-Thin-Enabled to Cow-preallocated-Enabled fails (block and FS storage type)

Version-Release number of selected component (if applicable):
ovirt-engine-4.5.1.3-654.af4ac851f145.33.el8ev.noarch
vdsm-4.50.2-1.el8ev


How reproducible:
100%

Steps to Reproduce:
1. Create a disk with API request:
{{ENV_Hostname}}/api/disks

<disk>
  <storage_domains>
    <storage_domain id="{{NFS_SD}}"/>
  </storage_domains>
  <name>NFS-Cow-Thin-Enabled</name>
  <provisioned_size>1073741824</provisioned_size>
  <format>cow</format>
  <sparse>true</sparse>
  <backup>incremental</backup>
</disk>

2. wait until the disk is in ok status and convert with the following request
{{ENV_Hostname}}/api/disks/{{NFS-Cow-Thin-Enabled}}/convert

<action>
    <disk>
        <sparse>false</sparse>
        <backup>incremental</backup>
    </disk>
</action>



Actual results:
The response finished with success "<status>complete</status>"
although in actual the disk allocated policy didn't change: <sparse>true</sparse>

Expected results:
<sparse>false</sparse>

Additional info:

Error from engine:
2022-07-18 12:17:39,173+03 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetHostJobsVDSCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-86) [a5b1ee96-9340-4e00-ad06-5a32eeed7df4] FINISH, GetHostJobsVDSCommand, return: {1ce01e85-0170-458a-ba0a-4f0fb30304d5=HostJobInfo:{id='1ce01e85-0170-458a-ba0a-4f0fb30304d5', type='storage', description='copy_data', status='done', progress='100', error='null'}}, log id: 69290f3d
2022-07-18 12:17:42,261+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.ConvertDiskCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-59) [a5b1ee96-9340-4e00-ad06-5a32eeed7df4] Requested allocation policy 'Preallocated' doesn't match allocation policy on storage 'Sparse'
2022-07-18 12:17:43,276+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.ConvertDiskCommand] (EE-ManagedScheduledExecutorService-engineScheduledThreadPool-Thread-64) [a5b1ee96-9340-4e00-ad06-5a32eeed7df4] Ending command 'org.ovirt.engine.core.bll.storage.disk.image.ConvertDiskCommand' with failure.

It seems like a regression didn't happen on Engine-4.5.0.7-0.9.el8ev

Comment 2 sshmulev 2022-07-18 13:02:39 UTC
Tested another scenario that raises this issue:
NFS disk:
from Raw-Thin-incremental_Disabled to Cow-Preallocated-incremental_enabled

Comment 3 RHEL Program Management 2022-07-18 14:09:48 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 sshmulev 2022-07-25 08:29:42 UTC
Verified.

Versions:
ovirt-engine-4.5.2-0.3.el8ev.noarch
vdsm-4.50.2.1-1.el8ev

Comment 5 Sandro Bonazzola 2022-08-30 08:47:42 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 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.