Ravi Nori has posted comments on this change.

Change subject: engine : Fail tasks that dont have Vdsm Id
......................................................................


Patch Set 7: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AsyncTaskManager.java
Line 179:         }
Line 180:         return false;
Line 181:     }
Line 182: 
Line 183:         public static void failTaskWithoutVdsmId(final AsyncTasks 
task) {
I think the name is correct 

failTaskWithoutVdsmId
Line 184:         task.getTaskParameters().setTaskGroupSuccess(false);
Line 185:         ExecutionHandler.endTaskStep(task.getStepId(), 
JobExecutionStatus.FAILED);
Line 186:         removeTaskFromDbByTaskId(task.getTaskId());
Line 187:         if (task.getTaskType() == AsyncTaskType.unknown) {


Line 182: 
Line 183:         public static void failTaskWithoutVdsmId(final AsyncTasks 
task) {
Line 184:         task.getTaskParameters().setTaskGroupSuccess(false);
Line 185:         ExecutionHandler.endTaskStep(task.getStepId(), 
JobExecutionStatus.FAILED);
Line 186:         removeTaskFromDbByTaskId(task.getTaskId());
Since clearing from db and endAction need to be in the same transaction, I 
introduced a new transaction here. Please review
Line 187:         if (task.getTaskType() == AsyncTaskType.unknown) {
Line 188:             return;
Line 189:         }
Line 190:         ThreadPoolUtil.execute(new Runnable() {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateCloneOfTemplateCommand.java
Line 55:             Guid taskId = 
this.createAsyncTask(VdcActionType.AddVmFromTemplate,
Line 56:                                 VdcObjectType.Storage,
Line 57:                                 getParameters().getStorageDomainId(),
Line 58:                                 getDestinationStorageDomainId());
Line 59:             getReturnValue().getAsyncTaskIdList().add(taskId);
I realized it only in this patch :). All 3 patches go together so I think it 
should be fine. Please let me know
Line 60: 
Line 61:             vdsReturnValue = Backend
Line 62:                     .getInstance()
Line 63:                     .getResourceManager()


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcReturnValueBase.java
Line 16:     private boolean _succeeded;
Line 17:     private boolean _isSyncronious;
Line 18:     private Object _returnValue;
Line 19:     private String _description = "";
Line 20:     private ArrayList<Guid> _asyncTaskIdList = new ArrayList<Guid>();
I will fix the names

asyncTaskIdList is the task id in asys tasks table

taskIdList should actually be vdsm task id
Line 21:     private ArrayList<Guid> _taskIdList = new ArrayList<Guid>();
Line 22:     private final ArrayList<Guid> _internalIdList = new 
ArrayList<Guid>();
Line 23:     private boolean _endActionTryAgain = true;
Line 24:     private final ArrayList<String> _executeFailedMessages = new 
ArrayList<String>();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I110c483842027d1596f64dd8c3f635d62924a93f
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to