Bug 848028 - ovirt-engine-backend [Quota]: unable to create snapshot due to wrong quota calculation after commit
ovirt-engine-backend [Quota]: unable to create snapshot due to wrong quota ca...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
urgent Severity high
: ---
: ---
Assigned To: ofri
Dafna Ron
sla
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-14 07:08 EDT by Dafna Ron
Modified: 2016-02-10 15:15 EST (History)
11 users (show)

See Also:
Fixed In Version: si19
Doc Type: Release Note
Doc Text:
Since the size of the consumed part of a quota is referring to the part allocated and not to the part actually used by the user there might differences between the used storage size appearing in the storage tab to the consumed storage appearing in the Quota>storage sub-tab.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:07:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log (24.92 KB, application/x-xz)
2012-08-14 07:08 EDT, Dafna Ron
no flags Details
logs and screen shots (91.88 KB, application/x-gzip)
2012-09-02 07:54 EDT, Dafna Ron
no flags Details

  None (edit)
Description Dafna Ron 2012-08-14 07:08:11 EDT
Created attachment 604264 [details]
log

Description of problem:

I created a vm and created several snapshots until the quota blocked me. 
I committed the snapshots (merge of snapshots) which should collapse all the snapshots below the one I selected. 
I can see in UI that the quota was changed back to the original disk size but I am still getting CanDoAction from engine that Quota is not valid. 

I am however able to create a new disk so it seems that we might not be cleaning the snapshot table. 

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

si13.2

How reproducible:

100%

Steps to Reproduce:
1. create a quota of 30G and a vm with preallocated 5GB disk
2. create snapshots until you are blocked by backend
3. commit the first snapshot (all other snapshots should be merged)
4. try to create a new snapshot 
  
Actual results:

we cannot create more snapshots after commit because of wrong calculation

Expected results:

after commit we should be able to create new snapshots

Additional info:log
Comment 1 ofri 2012-08-20 03:04:35 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Since the calculation of the size of the snapshot is dependent of the actual size on disk, it may lead to different behaviors on different file systems and storage systems.
Comment 3 Dafna Ron 2012-09-02 07:54:16 EDT
check in si16. 

I created a quota with 30GB and vm with 5GB disk.
I was blocked by quota after the first snapshot and quota is reporting 10GB out of 30 is used. 
moving back to devel 

Error while executing action: Cannot ${action} ${type}. Quota has no sufficient storage resources.
Comment 4 Dafna Ron 2012-09-02 07:54:40 EDT
Created attachment 609070 [details]
logs and screen shots
Comment 7 Dafna Ron 2012-09-09 14:12:18 EDT
we are still getting wrong calculation although they very from the first snapshot. 

tested in si17 with Quota of 30GB and vm with 1 disk of 5GB preallocated.  

I compare the quota to the storage tab -> vm's:

Snapshot#    |Toatal for Quota    | Toatal for VM's under storage tab  
--------------------------------------------------------------------
1            | 10GB               | 6GB                    
--------------------------------------------------------------------
2            | 11GB               | 7GB                     
--------------------------------------------------------------------
3            | 12GB               | 8GB
--------------------------------------------------------------------
4            | 13GB               | 9GB
--------------------------------------------------------------------
5            | 14GB               | 10GB
--------------------------------------------------------------------

after commit we see the same in vm under main storage and under the quota which is 6Gb but adding more snapshot I am still seeing the same behaviour. 

you can also see that the vm's tab under the storage tab is reporting the same numbers that we are seeing in the storage main tab.
Comment 8 ofri 2012-09-13 06:24:09 EDT
This is a storage issue. The return value of DiskImage.getActualValue() is wrong when called on the first snapshot creation for an iSCSI disk.
Comment 9 ofri 2012-09-24 02:59:00 EDT
The numbers described in comment 7 are not a bug. this is the usual behavior for thin provision (snapshot is always thin provision). Nevertheless, a tool-tip would be added to the “Used storage/Total” column in Quota>Storage sub-tab saying: These calculations represents the max growth potential and may differ from the actual consumption. Please refer documentation for further explanations. A Guides-Admin BZ was opened: BZ#859732.
Comment 10 ofri 2012-09-24 05:23:57 EDT
Posted to upstream: http://gerrit.ovirt.org/#/c/8153/
Comment 12 Dafna Ron 2012-10-02 09:52:11 EDT
verified on si19
Comment 13 Stephen Gordon 2012-11-01 16:12:47 EDT
Hey Miki does this actually need a release note anymore? I checked the bug referred to (Bug # 859732) and this actually made it into the admin guide before the translation freeze.
Comment 14 Miki Kenneth 2012-11-08 07:25:04 EST
Agree that it can be removed.
Comment 15 Stephen Gordon 2012-11-08 09:39:08 EST
Removing requires_doc_text- and also removing from release notes document.

Note You need to log in before you can comment on or make changes to this bug.