Maor Lipchuk has posted comments on this change.
Change subject: core: LiveMigrateDiskCommand - audit log on failure
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java
Line 138: return getParameters().getExecutionIndex() ==
getTaskHandlers().size() - 1;
Line 139: }
Line 140:
Line 141: @Override
Line 142: protected boolean canDoAction() {
Why using canDoAction to display audit log??
Are you sure DiskAlias and StorageDomainName are initialized? IIRC audit log
parameters are being initialized only when using the infrastructure of the
audit log.
Usually audit log should be displayed in the execute phase of the command (at
the finally part in the command base)
you wrote this is an internal command so you can't show messages, so why don't
use execute method and refactor the supre.canDoAction to a meaningful method
name.
Line 143: boolean canDoAction = super.canDoAction();
Line 144:
Line 145: if (!canDoAction) {
Line 146: AuditLogDirector.log(this,
AuditLogType.USER_MOVED_VM_DISK_FINISHED_FAILURE);
--
To view, visit http://gerrit.ovirt.org/17186
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie326395fe9d610f578829c9c5b8847097dfc7b27
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches