Bug 847982

Summary: ovirt-engine-backend [Quota]: inconsistency in snapshot quota use calculations
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: ofri <omasad>
Status: CLOSED CURRENTRELEASE QA Contact: Dafna Ron <dron>
Severity: high Docs Contact:
Priority: high    
Version: 3.1.0CC: dfediuck, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: sla
Fixed In Version: si17 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:
Attachments:
Description Flags
screen shot and log
none
new log and screen shot
none
log and screen shot none

Description Dafna Ron 2012-08-14 09:16:49 UTC
Created attachment 604227 [details]
screen shot and log

Description of problem:

I added snapshot to a vm and while the storage calculation in quota shows that we are taking only 1GB per storage  I am getting an alert in event log. 
I also in quota enforce so I should have been blocked not just reported but was not. 

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

si13.2

How reproducible:

100%

Steps to Reproduce:
1. create a quota with limitation on 30GB for one domain
2. create a vm with 5GB preallocated disk
3. start adding snapshots
  
Actual results:

I am getting an alert in event log on the 5th snapshot: 

Quota Dafna-si13-02 has exceeded Storage Threshold limitation.

Expected results:

1. if there was a quota violation and I'm in enforce I should be blocked
2. I can see in the quota that we are not exceeding and that each snapshot is calculated as 1 additional GB. 

Additional info: screen shot + log

Comment 1 Dafna Ron 2012-08-14 09:20:49 UTC
adding one one snapshot I was blocked by engine. 

Error:

Quota2:

    Cannot ${action} ${type}. Quota has no sufficient storage resources.

event log: 

Quota Dafna-si13-02 has exceeded Storage grace limitation.


it seems that we are calculating the snapshots as full size in engine but presenting it correctly in UI. 

adding new log and new screen shot

Comment 2 Dafna Ron 2012-08-14 09:24:37 UTC
Created attachment 604228 [details]
new log and screen shot

Comment 3 Doron Fediuck 2012-08-14 15:31:01 UTC
Dafna, can you make sure you weren't in the grace zone (which will only warn you)?

We're currently handling notifications in a different bz, but it sounds like you are not blocked sine you were given a grace.

Comment 4 Dafna Ron 2012-08-14 15:32:08 UTC
I was not :) I double checked before opening the bug

Comment 5 ofri 2012-08-21 06:49:13 UTC
Fixed on BZ#848028

Comment 6 Dafna Ron 2012-09-02 11:56:25 UTC
tested in si16
I was stopped after the fist snapshot
moving back to devel.

Comment 7 Dafna Ron 2012-09-02 11:56:47 UTC
Created attachment 609071 [details]
log and screen shot

Comment 8 Doron Fediuck 2012-09-02 12:24:37 UTC
Dafna,
what is the scenario you checked and when did it fail?

Comment 9 Dafna Ron 2012-09-02 12:41:22 UTC
same as described in bug's steps. 

Steps to Reproduce:
1. create a quota with limitation on 30GB for one domain
2. create a vm with 5GB preallocated disk
3. start adding snapshots
  

i was blocked after the first snapshot was created (so snapshot #2 failed).

Comment 10 ofri 2012-09-03 09:36:09 UTC
Fixed on BZ#848028 (New fix)

Comment 11 Dafna Ron 2012-09-09 18:15:01 UTC
I'm verifying this bug since most of the calculation errors are fixed with miner issues which are already specified in bug 848028 but there are no inconsistencies between backend and UI. 

verified on si17