Bug 855633 - engine: cannot import a vm when quota is in audit and no quota exists in setup
engine: cannot import a vm when quota is in audit and no quota exists in setup
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Gilad Chaplik
Dafna Ron
Depends On:
  Show dependency treegraph
Reported: 2012-09-09 09:03 EDT by Dafna Ron
Modified: 2016-02-10 15:16 EST (History)
9 users (show)

See Also:
Fixed In Version: si23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-04 15:05:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Dafna Ron 2012-09-09 09:03:41 EDT
Created attachment 611234 [details]

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):


How reproducible:


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

we are getting a CanDoAction:

2012-09-09 15:11:23,477 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.DoesImageExistVDSCommand] (ajp-/ FINISH, DoesImageExistVDSCommand, return: true, log id: 41aabfca
2012-09-09 15:11:23,503 WARN  [org.ovirt.engine.core.bll.ImportVmCommand] (ajp-/ 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 11:50:07 EDT
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 11:25:38 EDT
pushed upstream (http://gerrit.ovirt.org/#/c/8059/)
Comment 6 Dafna Ron 2012-11-05 10:20:23 EST
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.