Bug 855633 - engine: cannot import a vm when quota is in audit and no quota exists in setup
Summary: engine: cannot import a vm when quota is in audit and no quota exists in setup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Gilad Chaplik
QA Contact: Dafna Ron
URL:
Whiteboard: sla
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-09 13:03 UTC by Dafna Ron
Modified: 2016-02-10 20:16 UTC (History)
9 users (show)

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


Attachments (Terms of Use)
log (376.87 KB, application/x-xz)
2012-09-09 13:03 UTC, Dafna Ron
no flags Details

Description Dafna Ron 2012-09-09 13:03:41 UTC
Created attachment 611234 [details]
log

Description of problem:

if no quota exists in the setup and we are in audit log we are blocked by CanDoAction from importing a vm. 

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

si17

How reproducible:

100%

Steps to Reproduce:
1. edit your DC to work with Quota as Audit
2. import a vm
3.
  
Actual results:

we are getting a CanDoAction:

2012-09-09 15:11:23,477 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/127.0.0.1:8009-11) FINISH, DoesImageExistVDSCommand, return: true, log id: 41aabfca
2012-09-09 15:11:23,503 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/127.0.0.1:8009-11) CanDoAction of action ImportVm failed. Reasons:VAR__ACTION__COPY,VAR__TYPE__VM_TEMPLATE,ACTION_TYPE_FAILED_QUOTA_IS_NOT_VALID


Expected results:

since we are in audit mode we should succeed with error in audit log. 

Additional info: full log

Comment 1 Doron Fediuck 2012-09-09 15:50:07 UTC
It seems that org.ovirt.engine.core.bll.ImportVmTemplateCommand.validateAndSetQuota()
(or calling canDoAction) should be added a soft_limit check.

Comment 2 Gilad Chaplik 2012-09-19 15:25:38 UTC
pushed upstream (http://gerrit.ovirt.org/#/c/8059/)

Comment 6 Dafna Ron 2012-11-05 15:20:23 UTC
verified on si24. 
we cannot import before creating quota


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