Ravi Nori has uploaded a new change for review.

Change subject: engine : CoCo: Set status at end of command execution
......................................................................

engine : CoCo: Set status at end of command execution

Set status of commands without child commands and
commands without command callbacks at the end of command
execution

Change-Id: Ifc3960568993baf888a3d9f74e7fad4bd0589823
Bug-Url: https://bugzilla.redhat.com/1133041
Signed-off-by: Ravi Nori <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/32715/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 1496915..d60c48f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -1190,6 +1190,14 @@
                 setSucceeded(false);
                 compensate();
             } else {
+                // if the command is not an async task and has no custom 
callback
+                // set the status to SUCCEEDED if the status is ACTIVE
+                if (getTaskType() == AsyncTaskType.notSupported &&
+                        getReturnValue().getVdsmTaskIdList().isEmpty() &&
+                        getCallBack() == null &&
+                        commandStatus == CommandStatus.ACTIVE) {
+                    setCommandStatus(CommandStatus.SUCCEEDED);
+                }
                 cleanUpCompensationData();
             }
         }


-- 
To view, visit http://gerrit.ovirt.org/32715
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc3960568993baf888a3d9f74e7fad4bd0589823
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to