Bug 1179688

Summary: faulty storage allocation checks when adding a vm from template
Product: Red Hat Enterprise Virtualization Manager Reporter: Vered Volansky <vered>
Component: ovirt-engineAssignee: Vered Volansky <vered>
Status: CLOSED ERRATA QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, ecohen, gklein, iheim, lpeer, lsurette, rbalakri, Rhev-m-bugs, tnisan, yeylon, ylavi
Target Milestone: ---Keywords: Regression
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.0-30 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-15 09:15:11 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:    
Bug Blocks: 960934    

Description Vered Volansky 2015-01-07 10:52:48 UTC
Create a new VM and base it on a template in two methods, thinly provisioned or cloned.

1. When thin provisioning is chosen, AddVmCommand is called, and a VM is added with empty disks, thinly provisioned from the template.
Storage Allocation checks in this case should take into consideration that the new disks will always be SPARSE/COW, i.e., 1G on block domains, 1M on file domains, according to the tracker bug tables (bz960934).

2. When clone is chosen, AddVmFromTemplateCommand is called, and a VM is added with cloned disks, cloned from the template, where the regular validations for cloned disks should be made:

      | File Domain                             | Block Domain
 -----|-----------------------------------------|-------------
 qcow | preallocated : 1.1 * disk capacity      |1.1 * min(used ,capacity) 
      | sparse: 1.1 * min(used ,capacity)       |
 -----|-----------------------------------------|-------------
 raw  | preallocated: disk capacity             |disk capacity
      | sparse: min(used,capacity)


Verification should include a storage domain with and without enough space for  the vm (with disks).
Special care should be taken with the right verifications in these two specific flows.
In case of insufficient space a relevant CDA message should pop.

Comment 1 Allon Mureinik 2015-01-11 12:17:53 UTC
Additional insight: In 3.5.0, before the patch referenced in the tracker, there was a faulty allocation check that took into consideration the size of the template's disk, instead of just a thin QCOW layer on top of it.

The meaning of this is that if the template uses preallocated disks, you must have enough space for another preallocated disk when adding a VM based on it, effectively killing the notion of over-committing storage.
Thus, marking as a REGRESSION.

Comment 2 Kevin Alon Goldblatt 2015-01-21 13:18:31 UTC
Verified with v3.5 vt13.8

Comment 4 Eyal Edri 2015-02-15 09:15:11 UTC
bugs were moved by ERRATA to RELEASE PENDING bug not closed probably due to errata error.
closing as 3.5.0 is released.