Bug 840628

Summary: ovirt-engine-backend: Engine passes wrong params to vdsm when exporting a thin disk and converting to preallocated, leaving disk thinly provisioned
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Gilad Chaplik <gchaplik>
Status: CLOSED CURRENTRELEASE QA Contact: Dafna Ron <dron>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: abaron, amureini, dfediuck, dyasny, gpadgett, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression, Reopened
Target Release: 3.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: SI17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-08 09:37:51 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:
Bug Depends On: 800424    
Bug Blocks:    
Attachments:
Description Flags
log
none
logs none

Description Dafna Ron 2012-07-16 17:58:53 UTC
Description of problem:

I tried to convert a vm's disk from thinprovision to preallocated and the the disk remains as thinprovision. 
looking at the backend log we send the image with COW preallocated which leaves disk as thinprovision (preallocated disk type is sent with RAW preallocated). 


Version-Release number of selected component (if applicable):

si10

How reproducible:

100%

Steps to Reproduce:
1. import a thinprovision disk with collapse snapshots and select to change the disk type to preallocated
2.
3.
  
Actual results:

disk is not converted from thinprovision to preallocated

Expected results:

disk should be converted from thinprovision to preallocated

Additional info:engine log

2012-07-16 20:52:26,415 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (pool-4-thread-48) [162a5da6] START, CopyImageVDSCommand(storagePoolId = de4388ec-3
973-4015-bd5e-15b346dec7f1, ignoreFailoverLimit = false, compatabilityVersion = 3.1, storageDomainId = 1c4b81c0-bc2b-4b57-9341-5179ee848abd, imageGroupId = e383d7f0-bac1-4948-ae
14-a9d0e6465413, imageId = f569d881-1d6d-4c46-b3a7-991be7e3ec17, dstImageGroupId = e383d7f0-bac1-4948-ae14-a9d0e6465413, vmId = b6f3bedd-14f7-46b0-adf4-25b27fae2658, dstImageId 
= f569d881-1d6d-4c46-b3a7-991be7e3ec17, imageDescription = , dstStorageDomainId = 395bff6c-330a-423e-a84b-f8e533a03d0e, copyVolumeType = LeafVol, volumeFormat = COW, preallocate
 = Sparse, postZero = false, force = true), log id: 304eb092
2012-07-16 20:52:26,435 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.GetVmsInfoVDSCommand] (ajp-/0.0.0.0:8009-2) FINISH, GetVmsInfoVDSCommand, log id: 3f0d6f0d
2012-07-16 20:52:26,435 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (pool-4-thread-48) [162a5da6] -- CopyImageVDSCommand::ExecuteIrsBrokerCommand: call
ing 'copyImage' with two new parameters: description and UUID
2012-07-16 20:52:26,435 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.CopyImageVDSCommand] (pool-4-thread-48) [162a5da6] -- copyImage parameters:
                sdUUID=1c4b81c0-bc2b-4b57-9341-5179ee848abd
                spUUID=de4388ec-3973-4015-bd5e-15b346dec7f1
                vmGUID=b6f3bedd-14f7-46b0-adf4-25b27fae2658
                srcImageGUID=e383d7f0-bac1-4948-ae14-a9d0e6465413
                srcVolUUID=f569d881-1d6d-4c46-b3a7-991be7e3ec17
                dstImageGUID=e383d7f0-bac1-4948-ae14-a9d0e6465413
                dstVolUUID=f569d881-1d6d-4c46-b3a7-991be7e3ec17
                descr=

Comment 1 Dafna Ron 2012-07-16 17:59:20 UTC
Created attachment 598512 [details]
log

Comment 3 Ayal Baron 2012-07-29 15:28:11 UTC
Please attach vdsm log to see what command was actually executed

Comment 4 Dafna Ron 2012-07-31 11:58:38 UTC
this is backend bug
the params are already wrong when they are sent to vdsm: 

volumeFormat = COW, preallocate

at your request I am changing the headline.

Comment 5 Ayal Baron 2012-08-01 13:55:16 UTC
(In reply to comment #4)
> this is backend bug
> the params are already wrong when they are sent to vdsm: 
> 
> volumeFormat = COW, preallocate
> 
> at your request I am changing the headline.

but you say it's 'preallocate' so again, I don't understand.
Please provide vdsm log so I can properly see the vdsm command that was issued.

Comment 6 Dafna Ron 2012-08-12 15:42:12 UTC
Created attachment 603797 [details]
logs

Comment 7 Dafna Ron 2012-08-12 15:45:13 UTC
logs added

Comment 8 Greg Padgett 2012-08-23 21:09:44 UTC
Gilad is working on a patch which resolves this issue, for bug 800424 (thus passing this bug over to him).

Comment 9 Gilad Chaplik 2012-08-26 08:42:44 UTC
pushed upstream (http://gerrit.ovirt.org/#/c/7313/)

Comment 11 Dafna Ron 2012-09-09 09:04:11 UTC
verified on si17