Created attachment 1184283 [details] engine log Description of problem: When a command that executes few child commands that each create task (the common usecase - for example: ImportVm/ExportVm) and failing after the first task was created (for example: when attempting to initiate the second task) the command endSuccesfully() will be executed although the execution has failed. How reproducible: Always Steps to Reproduce: 1. Attempt to Export a VM with 2 disks 2. Make sure that the first task creation will succeed 3. Make sure that the first task creation will fail Actual results: ExportVmCommand.endSuccesfully() will be executed Expected results: ExportVmCommand.endWithFailure() should be executed Additional info: This is a regression, worked previously.
Liron - it fails only on 4.1? Aharon, can you test it on 4.0 and 3.6.8?
(In reply to Oved Ourfali from comment #1) > Aharon, can you test it on 4.0 and 3.6.8? Kevin, Please do.
(In reply to Oved Ourfali from comment #1) > Liron - it fails only on 4.1? > Aharon, can you test it on 4.0 and 3.6.8? I've tested only on 4.1, Kevin will update on 4/3.6.8.
Restoring Needinfo on Kevin
Ravi, could you please investigate?
AsyncTaskManager gets task statuses directly from vdsm. Setting a break point and modifying the status of individual VdcCommand executions is not going to effect what the AsyncTaskManager sees. However setting a break point in HSMGetAllTasksStatusesVDSCommand at parseTaskStatusList and modifying the return values works. To do this set the value of AsyncTaskStatus.result to AsyncTaskResultEnum.failure for the second MoveImageGroupVDSCommand. When this is done ExportVmCommand's endWithFailure is invoked and everything works.
I was able to reproduce this on master by manually failing execution of second submission to vdsm using break points.
Moving back to POST, we need to backport ovirt-engine-4.0 branch
(In reply to Aharon Canan from comment #4) > Restoring Needinfo on Kevin On 3.6.x it works as expected. Tested with the following code: ---------------------------------- vdsm-4.17.33-1.el7ev.noarch rhevm-3.6.8.1-0.1.el6.noarch Tested with the following scenario: ------------------------------------ Steps to Reproduce: 1. Attempt to Export a VM with 2 disks 2. Make sure that the first task creation will succeed 3. Make sure that the next task creation will fail Actual results: ExportVmCommand.endWithFailure() was executed From engine.log: ------------------- 2016-08-14 15:27:46,034 INFO [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-6-thread-27) [1c7171 50] CommandAsyncTask::endCommandAction [within thread] context: Attempting to endAction 'ExportVm', executionIndex: '0' 2016-08-14 15:27:46,086 ERROR [org.ovirt.engine.core.bll.ExportVmCommand] (org.ovirt.thread.pool-6-thread-27) [1c717150] End ing command 'org.ovirt.engine.core.bll.ExportVmCommand' with failure.
Verified on 4.0.4-1