Bug 1097777

Summary: An NFS thin provision template fails to be copied to ISCSI domain if templates virtual size succeeds the free space on ISCSI domain
Product: Red Hat Enterprise Virtualization Manager Reporter: Ori Gofen <ogofen>
Component: ovirt-engineAssignee: Nobody <nobody>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: acanan, acathrow, amureini, fsimonce, gklein, iheim, lpeer, Rhev-m-bugs, tnisan, vered, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-14 22:46:56 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: 1084789    
Bug Blocks:    
Attachments:
Description Flags
vdsm+engine logs none

Description Ori Gofen 2014-05-14 13:55:13 UTC
Created attachment 895503 [details]
vdsm+engine logs

Description of problem:

When creating a template from a vm which has a thin provision disk that his virtual size is bigger than the free space on block domain, the operation of coping the template to the iscsi domain fails on CanDoAction,even though the actual size is sufficient

2014-05-14 16:48:25,803 WARN  [org.ovirt.engine.core.bll.MoveOrCopyDiskCommand] (ajp-/127.0.0.1:8702-1) [19edb488] CanDoAction of action MoveOrCopyDisk failed. Reasons:VAR__ACTION__COPY,VAR__TYPE__VM_DISK,ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN,$storageName ISCSI_1
2014-05-14 16:48:25,803 INFO  [org.ovirt.engine.core.bll.MoveOrCopyDiskCommand] (ajp-/127.0.0.1:8702-1) [19edb488] Lock freed to object EngineLock [exclusiveLocks= key: c8764ec4-d18f-4dd6-9a23-0a1afc097a76 value: DISK
, sharedLocks= key: 6d91e5f6-7d42-4b4e-b502-0cda4505f4ee value: TEMPLATE
]


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

vdsm-4.14.7-2.el6ev.x86_64
rhevm-3.4.0-0.20.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
Setup:Have a dc with two domains one NFS,one ISCSI

1.create a vm with thin provision NFS disk with virtual size that is bigger than the free space at the ISCSI domain
2.make a template from the vm
3.copy the template to ISCSI domain

Actual results:

operation fails with CanDoAction on engine 

Expected results:
operation should be successful if the actual size of the template is sufficient 

Additional info:

Comment 1 Ori Gofen 2014-05-14 15:51:10 UTC
the bug recreates when attempting any movement of thin provision nfs disks(with bigger virtual size...) to iscsi domain

Comment 2 Allon Mureinik 2014-05-14 22:46:56 UTC
On NFS (or any file domain, for that matter), the disks are SPARSE. When copying them to iSCSI (or any block domain, for that matter), they must be converted to PREALLOCATED, and hence the virtual size is compared to the free space.