Omer Frenkel 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 Signed-off-by: Arik Hadas <aha...@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/23642 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I74bd39fd5a4dc95694e9a059c40f7797b5e97623 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches