Liron Aravot has submitted this change and it was merged.
Change subject: core: Adding CommandStatus indicating the endAction() was executed
......................................................................
core: Adding CommandStatus indicating the endAction() was executed
Currently when command async operations execution ends its status is set to
SUCCEEDED/FAILED (either by the callback or in CommandBase if it has no
callback.) - The problem is that this status doesn't indicate that the
endAction() execution was ended - this may cause the parent to determine
that a child command was ended prematurely.
For commands that has callbacks the CommandEntity.isCallbackNotified()
flag is set after the onSucceeded()/onFailed() method are called and may
be used as an indication that the endAction() method was executed - this
may be confusing (as one need to remember to check the command status
and this flag as well). Furthremore, this flag is currently not uses for
AsyncTaskManager managed commands.
This patch adds new command statuses, ENDED_SUCCESSFULLY and
ENDED_WITH_FAILURE that indicates that the endAction() method logic was
executed, in a further patch we can look into remove the isCallbackNotified()
flag.
Change-Id: Ib1ae7b2c247ce5343352cbdd70e8fa060d25f7dd
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChildCommandsCallbackBase.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeExtendCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmPoolCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/HostUpgradeCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveDiskSnapshotsCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotSingleDiskLiveCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/CloneCinderDisksCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveAllCinderDisksCommandCallBack.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveCinderDiskCommandCallback.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandAsyncTask.java
M
backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/CommandStatus.java
12 files changed, 50 insertions(+), 20 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Liron Aravot: Verified; Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/50492
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1ae7b2c247ce5343352cbdd70e8fa060d25f7dd
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadgett(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>