Kanagaraj M has uploaded a new change for review.

Change subject: gluster: fix cleaning up orphan tasks
......................................................................

gluster: fix cleaning up orphan tasks

When there is rebalance task in progress and
'task list' is failed in vdsm for some reason,
engine should not cleanup this task and move to UNKNOWN.

Change-Id: I4f9bb53e5c2be194efeba966355d0245bcc18384
Bug-Url: https://bugzilla.redhat.com/1060138
Signed-off-by: Kanagaraj M <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJob.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/23936/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJob.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJob.java
index 9d19f68..1dccbdc 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJob.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTasksSyncJob.java
@@ -334,7 +334,8 @@
 
         for (Guid taskId: tasksNotRunning) {
             GlusterVolumeEntity vol= 
getVolumeDao().getVolumeByGlusterTask(taskId);
-            if (vol != null && vol.getStatus() != GlusterStatus.UP &&  
!runningTasksInClusterMap.keySet().contains((vol.getClusterId()))) {
+            if (vol != null && vol.getStatus() != GlusterStatus.UP
+                    || 
!runningTasksInClusterMap.keySet().contains((vol.getClusterId()))) {
                 // the volume is not UP. Hence gluster may not have been able 
to return tasks for the volume
                 // also handling the case where gluster was not able to return 
any tasks from this cluster - the keyset will not
                 // contain the cluster id in such case


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

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

Reply via email to