Tasks with retries, join, and multiple upstream tasks may execute even if an upstream task fails

Bug #1743646 reported by Matt B
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mistral
In Progress
High
Vitalii Solodilov
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

Tasks that have join: all and retry may still execute if upstream tasks fail

I ran the attached workflow in a docker image generated from tools/docker/Dockerfile in mistral 5.2.0. Note that the "joined_retry" task transitions from the DELAYED state to the SUCCESS state. If you remove the retry block, this task goes directly to FAILED. In that case it is not triggered by the later job and it does not publish output.

root@f316915139b2:~# mistral workflow-create retry_join.yml
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
| ID | Name | Project ID | Tags | Input | Created at | Updated at |
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
| 677cf5e7-d6fb-4588-91c6-2b7a24a50a0c | join_retry | <default-project> | <none> | | 2018-01-16 20:01:46 | None |
+--------------------------------------+------------+-------------------+--------+-------+---------------------+------------+
root@f316915139b2:~# mistral execution-create join_retry
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| ID | 1b040121-6764-4a83-9b52-4d664fc4c870 |
| Workflow ID | 677cf5e7-d6fb-4588-91c6-2b7a24a50a0c |
| Workflow name | join_retry |
| Description | |
| Task Execution ID | <none> |
| State | RUNNING |
| State info | None |
| Created at | 2018-01-16 20:02:07 |
| Updated at | 2018-01-16 20:02:07 |
+-------------------+--------------------------------------+
root@f316915139b2:~# mistral task-list 1b040121-6764-4a83-9b52-4d664fc4c870
mistral +--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| ID | Name | Workflow name | Execution ID | State | State info | Created at | Updated at |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| 0e92c24d-342c-47ae-a9db-270d917b5dfb | succeed | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:07 | 2018-01-16 20:02:17 |
| 4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec | failure | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | ERROR | Failed to run action [act... | 2018-01-16 20:02:07 | 2018-01-16 20:02:18 |
| eff3aabd-61fb-456e-aa88-c8220c90f8f0 | joined_retry | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | WAITING | Task is waiting. | 2018-01-16 20:02:17 | <none> |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
root@f316915139b2:~# mistral task-list 1b040121-6764-4a83-9b52-4d664fc4c870
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| ID | Name | Workflow name | Execution ID | State | State info | Created at | Updated at |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
| 0e92c24d-342c-47ae-a9db-270d917b5dfb | succeed | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:07 | 2018-01-16 20:02:17 |
| 4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec | failure | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | ERROR | Failed to run action [act... | 2018-01-16 20:02:07 | 2018-01-16 20:02:18 |
| eff3aabd-61fb-456e-aa88-c8220c90f8f0 | joined_retry | join_retry | 1b040121-6764-4a83-9b52-4d664fc4c870 | SUCCESS | None | 2018-01-16 20:02:17 | 2018-01-16 20:02:20 |
+--------------------------------------+--------------+---------------+--------------------------------------+---------+------------------------------+---------------------+---------------------+
root@f316915139b2:~# mistral execution-get-output 1b040121-6764-4a83-9b52-4d664fc4c870
{
    "ok": "ok",
    "result": "Failure caused by error in tasks: failure\n\n failure [task_ex_id=4d05fd8a-be21-4b0a-8719-9d5c3d7f56ec] -> Failed to run action [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, action_cls='<class 'mistral.actions.action_factory.JavaScriptAction'>', attributes='{}', params='{u'script': u'throw \"failed immediately\"\\n'}']\n JavaScriptAction failed: failed immediately\n [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, idx=0]: Failed to run action [action_ex_id=a1232435-e03b-404d-872f-8a0b8e6f9417, action_cls='<class 'mistral.actions.action_factory.JavaScriptAction'>', attributes='{}', params='{u'script': u'throw \"failed immediately\"\\n'}']\n JavaScriptAction failed: failed immediately\n"
}

Revision history for this message
Matt B (matty-brennan) wrote :
Dougal Matthews (d0ugal)
Changed in mistral:
status: New → Triaged
Dougal Matthews (d0ugal)
Changed in mistral:
importance: Undecided → High
Changed in mistral:
assignee: nobody → Vitalii Solodilov (mcdoker18)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/586914

Changed in mistral:
status: Triaged → In Progress
Revision history for this message
Paul White (paulw2u) wrote :

Closing seemingly redundant Ubuntu task.

Changed in ubuntu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.