Oved Ourfali has submitted this change and it was merged.
Change subject: core: refactor failure to run vm flow - part 1
......................................................................
core: refactor failure to run vm flow - part 1
In most of the case when we fail to run VM we want to have proper audit
message for it to be logged. That's why on almost every call to
RunVmCommandBase#failedToRunVm method we log an audit message right
before or after the call.
One exception though is on the execution phase of RunVm - if the VM
fails to run we do not need to log it, because it would be logged
automatically by the infrastructure when the execution phase ends.
This patch moves the call to log audit message to be within the
failedToRunVm method. As for the case where the failedToRunVm method is
called within the execution phase of RunVm, we'll also log it inside the
failedToRunVm method, but set commandShouldBeLogged to false so the
infrastructure will not log it again.
This patch contains two additional minor refactoring changes.
Change-Id: I74bd39fd5a4dc95694e9a059c40f7797b5e97623
Bug-Url:
https://bugzilla.redhat.com/1049321
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
3 files changed, 15 insertions(+), 16 deletions(-)
Approvals:
Omer Frenkel: Looks good to me, approved
Arik Hadas: Verified
--
To view, visit
http://gerrit.ovirt.org/28116
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I74bd39fd5a4dc95694e9a059c40f7797b5e97623
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server