Bug 1053740

Summary: Missing storage allocation checks when extending a disk
Product: [Retired] oVirt Reporter: Allon Mureinik <amureini>
Component: ovirt-engine-coreAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4CC: acanan, acathrow, amureini, eedri, gickowic, gklein, iheim, jkt, knesenko, lpeer, obasan, Rhev-m-bugs, scohen, s.kieske, vered, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: All   
Whiteboard: storage
Fixed In Version: ovirt-3.4.0-beta3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1053733 Environment:
Last Closed: 2014-03-31 12:29: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:    
Bug Blocks: 960934    

Description Allon Mureinik 2014-01-15 17:13:16 UTC
+++ This bug was initially created as a clone of Bug #1053733 +++

+++ This bug was initially created as a clone of Bug #960934 +++

When extending a disk no validation that the domain has enough free space is made. 

The space requirements:
(Note that even though the disk may contain data, the EXTENDED part does not have any new data except for pre-allocation considerations):

      | File Domain                         | Block Domain
 -----|-------------------------------------|-------------
 qcow | no additional validation required   |no additional validation required
      | (header is already allocated)       |(header is already allocated)
 -----|-------------------------------------|-------------
 raw  | preallocated:                       |new capacity - old capacity
      | new capacity - old capacity         | 
      | thin (sparse): no additional        |
      | validation                          |

Comment 1 Sandro Bonazzola 2014-02-19 12:26:53 UTC
This bug is referenced in ovirt-engine-3.4.0-beta3 logs. Moving to ON_QA

Comment 2 Elad 2014-03-12 15:24:11 UTC
Allon,
Is this one need to be checked using resize to disk to larger size than the free space on the domain?

Comment 3 Allon Mureinik 2014-03-12 16:14:29 UTC
Yes.
With a thinly provisioned disk it should succeed, and with a preallocated one it should fail.

Comment 4 Elad 2014-03-18 09:52:42 UTC
Tested the following:
On block:
1) Tried to extend a thin-provision disk from 7G to 57G on a storage domain that has 48G free space - SUCCEEDED.
2) Tried to extend a preallocated disk from 3G to 40G on a storage domain that has 38G free space - FAILED - blocked with a CDA failure message

On file:
1) Tried to extend a thin-provision disk from 3 to 25G on a storage domain that has 14G free space - SUCCEEDED.
2) Tried to extend a preallocated disk from 2G to 25G on a storage domain that has 14G free space - FAILED - blocked with a CDA failure message


Verified using RHEV3.4-AV3

Comment 5 Sandro Bonazzola 2014-03-31 12:29:51 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released