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
It seems that org.ovirt.engine.core.bll.ImportVmTemplateCommand.validateAndSetQuota() (or calling canDoAction) should be added a soft_limit check.
pushed upstream (http://gerrit.ovirt.org/#/c/8059/)
merged upstream (http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=701e809a1ef8a48a937ba130273b2fdfb8895529)
verified on si24. we cannot import before creating quota