Change in ovirt-engine[master]: core: refactor failure to run vm flow - part 1

ofrenkel at redhat.com ofrenkel at redhat.com
Sun Feb 9 14:53:11 UTC 2014


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 <ahadas at 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 <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list