Bug 854491 - When quota is enforced - statless vm is counted twice.
Summary: When quota is enforced - statless vm is counted twice.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: ofri
QA Contact: Dafna Ron
URL:
Whiteboard: sla
Depends On: 863766
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-05 07:32 UTC by ofri
Modified: 2016-02-10 20:13 UTC (History)
8 users (show)

Fixed In Version: si20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-04 20:03:44 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (205.39 KB, application/x-xz)
2012-09-21 09:23 UTC, Dafna Ron
no flags Details

Description ofri 2012-09-05 07:32:27 UTC
Description of problem:
When quota is enforced. Runnig a statless VM will count the cpu and memory of the vm twice (thus, sometimes blockong the run)


How reproducible:
100%

Steps to Reproduce:
1. set quota to enforce
2. applay a 1024 MB mem quota to a 1024 MB VM
3. run the VM once (as stateless)
  
Actual results:
fails to run - quota dont have suficient memory,

Expected results:
should run

Additional info:

Comment 1 ofri 2012-09-05 08:52:23 UTC
posted to upstream: http://gerrit.ovirt.org/#/c/7762/

Comment 3 Dafna Ron 2012-09-21 09:23:06 UTC
tested in si18 - failed QE
I created a quota with mem use of 1024
created a vm with mem of 1024

when we run the vm as stateless we are blocked by quota
when we run the vm without the stateless tag we are able to run the vm 

moving back to devel

2012-09-21 12:17:14,918 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (pool-4-thread-43) CanDoAction of action RunVm failed. Reasons:VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE
_FAILED_QUOTA_VDS_GROUP_LIMIT_EXCEEDED,$VmName GHGH

Comment 4 Dafna Ron 2012-09-21 09:23:47 UTC
Created attachment 615314 [details]
log

Comment 5 ofri 2012-09-24 11:38:41 UTC
Unable to reproduce. Please provide a reproducer.

Comment 6 Dafna Ron 2012-09-25 10:46:41 UTC
Ofri, I tested again in si18.1 and its reproduced. 
please try with iscsi storage, one host
1. move the DC  to enforce quota
2. create unlimited quota
3. create a vm with mem of 512
4. edit the quota and select specific cluster -> limit memory to 512
5. run the vm -> vm should run
6. edit vm and add the stateless tag 
7. run vm -> vm fails to run with canDoAction: 

2012-09-25 12:48:26,938 WARN  [org.ovirt.engine.core.bll.RunVmCommand] (pool-4-thread-43) CanDoAction of action RunVm failed. Reasons:VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_QUOTA_VDS_GROUP_LIMIT_EXCEEDED,$VmName Quota1_VM

Comment 7 ofri 2012-09-27 08:39:12 UTC
Bug is reproduced only when the stateless is triggered on the VM edit pop-up (not when stateless is triggered on the Run once pop-up).
Posted to upstream: http://gerrit.ovirt.org/#/c/8223/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java

Comment 9 Dafna Ron 2012-10-07 10:21:38 UTC
blocked by https://bugzilla.redhat.com/show_bug.cgi?id=863766

Comment 10 Dafna Ron 2012-10-29 16:00:01 UTC
verified on si22.1


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