Bug 1001032

Summary: Copy template operation don't properly update storage resources of quota.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ondra Machacek <omachace>
Component: ovirt-engineAssignee: Gilad Chaplik <gchaplik>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, dfediuck, eedri, iheim, lpeer, mavital, Rhev-m-bugs, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: is24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1038284    
Attachments:
Description Flags
engine.log
none
Screenshot of GUI none

Description Ondra Machacek 2013-08-26 11:15:31 UTC
Created attachment 790432 [details]
engine.log

Description of problem:
When template disk is copied to different quota, then quotas storage resources
are set incorrectly.

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

How reproducible:
always

Steps to Reproduce:
0. Have at least two SD.
1. Set DC to enforce mode.
2. Create quota1[sd limit 10GB] and quota2[sd limit 10GB].
3. Create template with 1GB disk on sd1 with quota1.
4. Copy template disk to sd2 with quota2.

Actual results:
DC->Quota resources show correct values:
Storage consumtion of quota1: Free 9/10GB
Storage consumtion of quota2: Free 9/10GB

but values in database are incorrect.
engine=# select storage_size_gb_usage from quota_global_view;
 storage_size_gb_usage 
-----------------------
                     2
                     0

Expected results:
Both quotas should consume 1GB.
engine=# select storage_size_gb_usage from quota_global_view;
 storage_size_gb_usage 
-----------------------
                     1
                     1

Additional info:

Comment 1 Artyom 2013-11-18 15:54:59 UTC
Created attachment 825732 [details]
Screenshot of GUI

Checked on is23
Still data in gui and database different:
From screenshot, we can see that storage consumption for quota_1 is 20%(2Gb) and query from database return:
engine=> SELECT storage_size_gb_usage FROM quota_global_view WHERE quota_name='quota_1';
 storage_size_gb_usage 
-----------------------
                     1

And for quota_2 consumption must be 2Gb, but query return:
engine=> SELECT storage_size_gb_usage FROM quota_global_view WHERE quota_name='quota_2';
 storage_size_gb_usage 
-----------------------
                     2

Comment 2 Eyal Edri 2013-11-19 13:23:00 UTC
doron, on what basis did you moved this bug to ON_QA?
i don't see it in is23, but i do see it in the build, it will be in IS24.

build was done at nov 12: org.ovirt.engine-root-3.3.0-33 	dcaroest 	2013-11-12 12:38:29

patch was merged at nov 13.

Comment 3 Doron Fediuck 2013-11-24 10:26:48 UTC
Updating based on comment 2

Comment 4 Artyom 2013-11-25 15:00:23 UTC
Verified on is24.1

Comment 5 Itamar Heim 2014-01-21 22:30:44 UTC
Closing - RHEV 3.3 Released

Comment 6 Itamar Heim 2014-01-21 22:30:45 UTC
Closing - RHEV 3.3 Released

Comment 7 Itamar Heim 2014-01-21 22:33:44 UTC
Closing - RHEV 3.3 Released