Bug 1001017

Summary: Quota resources are not counted correctly when vm with snaphots is removed.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engineAssignee: Doron Fediuck <dfediuck>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, dfediuck, iheim, lpeer, pstehlik, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Regression
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: is15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:20:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log none

Description Ondra Machacek 2013-08-26 10:25:30 UTC
Created attachment 790404 [details]
engine.log

Description of problem:
When vm with snaphots is removed, quota storage resources are not counted
correctly.

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

How reproducible:
always

Steps to Reproduce:
1. Set DC to enforced.
2. Create quota with 20GB storage resources.
3. Create vm with 1GB thin provision disk.
4. Create snaphost of vm.
5. Remove vm.

Actual results:
Storage resources show - Free 19/20GB.

Expected results:
Storage resources show - Free 20/20GB.

Additional info:
Seems similar as bug 963587.
db:

engine=# select * from quota_global_view;
               quota_id               |           storage_pool_id            | storage_pool_name | quota_name | description | threshold_vds_group_percentage | threshold_storage_percentage | grace_vds_group_percentage | grace_storage_percentage | virtual_cpu | virtual_cpu_
usage | mem_size_mb | mem_size_mb_usage | storage_size_gb | storage_size_gb_usage | quota_enforcement_type 
--------------------------------------+--------------------------------------+-------------------+------------+-------------+--------------------------------+------------------------------+----------------------------+--------------------------+-------------+-------------
------+-------------+-------------------+-----------------+-----------------------+------------------------
 48decd8f-db52-4a34-911f-1fba8c56f545 | 17f06f0c-7707-4c60-aa37-b55d31a05634 | DC32              | quota_1    |             |                             80 |                           80 |                         20 |                       20 |           3 |             
    0 |        4096 |                 0 |              20 |                     0 |                      2

Comment 2 Ondra Machacek 2013-08-26 10:35:50 UTC
If vm has prealocated disk, and has snaphost created, then if vm is removed.
Storage resources show - Free 18/20GB, Storage consumption 5%

database:
engine=# select storage_size_gb_usage from quota_global_view;
 storage_size_gb_usage 
-----------------------
                     0

Comment 4 Lukas Svaty 2013-09-24 12:14:41 UTC
verified in is16

Comment 5 Itamar Heim 2014-01-21 22:20:10 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:25:55 UTC
Closing - RHEV 3.3 Released