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

Bug 2072423

Summary: Disk is being copied with wrong allocation policy
Product: [oVirt] ovirt-engine Reporter: Ilia Markelov <imarkelo>
Component: BLL.StorageAssignee: Artiom Divak <adivak>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Markelov <imarkelo>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5.0CC: adivak, ahadas, bugs, bzlotnik, dfodor, sfishbai, sleviim
Target Milestone: ovirt-4.5.1Keywords: ZStream
Target Release: ---Flags: pm-rhel: ovirt-4.5?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.5.1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-06-23 05:54:58 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 Ilia Markelov 2022-04-06 09:37:50 UTC
Description of problem:
While copying the disk with "preallocated" allocation policy and 
incremental backup enabled, the copy gets "thin provision" allocation 
policy. 

Version-Release number of selected component (if applicable):
Version 4.5.0.1-601.f26e9ea8cac5.3.el8ev
vdsm-4.50.0.10-1.el8ev.x86_64

How reproducible: 
100%


Steps to Reproduce:
1. Create a preallocated disk with "incremental backup" enabled through 
the UI (Looks like it doesn't matter if it's attached to some VM or not 
and SD doesn't matter too). 
2. Copy the disk to another domain. I did it with iscsi1 -> iscsi2, nfs1 -> nfs2 and iscsi1 -> gluster1.

Actual results:
The copy of the disk gets "Thin Provision" allocation policy

Expected results:
The copy of the disk should be preallocated.

Additional info:
Not a regression, reproduces on 4.4.10 as well

Comment 2 Benny Zlotnik 2022-04-06 09:51:20 UTC
Relevant piece of code:
https://github.com/oVirt/ovirt-engine/blob/3c09efb4e34384619492cf6ac57c3cc139e8d002/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/CreateVolumeContainerCommand.java#L83

It should instead consider the incremental backup flag, this would probably allow dropping the ActionType.ConvertDisk check as well

Comment 4 Arik 2022-06-07 13:55:19 UTC
Not sure why I moved it to ON_QA.. the fix would be available in 4.5.1-1

Comment 5 Ilia Markelov 2022-06-13 13:08:04 UTC
Verified.

Disks were copied with the same allocation policy as the source disks.

Versions:
engine-4.5.1.1-0.14.el8ev 
vdsm-4.50.1.2-1.el8ev.x86_64

Comment 6 Sandro Bonazzola 2022-06-23 05:54:58 UTC
This bugzilla is included in oVirt 4.5.1 release, published on June 22nd 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.1 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.