|Summary:||When failing on command execution after one task was created the command will reach endSuccesfully() instead of endWithFailure()|
|Product:||[oVirt] ovirt-engine||Reporter:||Liron Aravot <laravot>|
|Component:||Backend.Core||Assignee:||Ravi Nori <rnori>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Petr Matyáš <pmatyas>|
|Version:||4.1.0||CC:||acanan, amureini, bugs, kgoldbla, laravot, mgoldboi, mperina, pmatyas, pstehlik, rnori|
|Fixed In Version:||Doc Type:||If docs needed, set a value|
|Doc Text:||Story Points:||---|
|Last Closed:||2016-09-26 12:34:17 UTC||Type:||Bug|
|oVirt Team:||Infra||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
Description Liron Aravot 2016-07-26 14:25:25 UTC
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.
Comment 1 Oved Ourfali 2016-07-27 08:16:34 UTC
Liron - it fails only on 4.1? Aharon, can you test it on 4.0 and 3.6.8?
Comment 2 Aharon Canan 2016-07-27 08:23:28 UTC
(In reply to Oved Ourfali from comment #1) > Aharon, can you test it on 4.0 and 3.6.8? Kevin, Please do.
Comment 3 Liron Aravot 2016-07-27 08:31:50 UTC
(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.
Comment 4 Aharon Canan 2016-07-27 08:52:43 UTC
Restoring Needinfo on Kevin
Comment 5 Martin Perina 2016-07-28 12:08:52 UTC
Ravi, could you please investigate?
Comment 6 Ravi Nori 2016-07-28 17:07:42 UTC
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.
Comment 7 Ravi Nori 2016-07-29 15:02:09 UTC
I was able to reproduce this on master by manually failing execution of second submission to vdsm using break points.
Comment 8 Martin Perina 2016-08-11 11:15:32 UTC
Moving back to POST, we need to backport ovirt-engine-4.0 branch
Comment 9 Kevin Alon Goldblatt 2016-08-14 15:40:34 UTC
(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-188.8.131.52-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.
Comment 10 Petr Matyáš 2016-09-08 13:44:57 UTC
Verified on 4.0.4-1