Sahina Bose has posted comments on this change.

Change subject: engine: Support for gluster asynchronous tasks(WIP)
......................................................................


Patch Set 3: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterTaskManager.java
Line 68:             GlusterAsyncTask task = 
GlusterTaskStatusUtil.getTaskStatus(taskId);
Line 69:                 //get step from db for the corresponding gluster task
Line 70:             List<Step> steps = 
DbFacade.getInstance().getStepDao().getStepsByExternalId(taskId);
Line 71:             //update status in step table
Line 72:             for (Step step: steps) {
Was reusing the ExecutionHandler endTaskJob when task is ended. Also provides 
an option for callback to command's endAction if needed.
Line 73:                 step.setDescription(getTaskMessage(step,task));
Line 74:                 if (hasTaskCompleted(task)) {
Line 75:                     //ExecutionHandler.endTaskStep(step.getId(), 
getJobCompletedStatus(task));
Line 76: 


Line 154:     }
Line 155: 
Line 156:     private void initializeTasks() {
Line 157:         //get external tasks from DB where not completed.
Line 158:         //May not be required if we use gluster Tasks list from UP 
server for each cluster
Task list can be obtained from any one of the UP servers in a cluster. However, 
if all hosts are down in the cluster, one option we have is to leave status of 
task unchanged and periodically poll status of task till the host responds. Can 
think of a max time till task is considered outdated.
Line 159: 
Line 160:         initAndCleanupOrphanTasks();
Line 161:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a56785edef091bce74e2b7b0ba9a3314f1397f1
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to