Red Hat Bugzilla – Bug 855633
engine: cannot import a vm when quota is in audit and no quota exists in setup
Last modified: 2016-02-10 15:16:01 EST
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):
Steps to Reproduce:
1. edit your DC to work with Quota as Audit
2. import a vm
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
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