Retry policy doesn't work when task was rerun

Bug #1772265 reported by Vitalii Solodilov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Vitalii Solodilov

Bug Description

As Mistral user I expect that number of retry times will begin with 0 when I rerun task.
For example, workflow:
version: '2.0'
wf_fail:
  tasks:
    task1:
      action: std.fail
      retry:
        delay: 0
        count: 5

When workflow was failed for the first time I see 6 created action executions, as had been expected.

+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+
| ID | Name | Workflow name | Task name | Task ID | State | Accepted | Created at | Updated at |
+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+
| 376a8fe3-ce98-4e39-9a7a-ba8bfcf8667c | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:49 | 2018-05-20 14:06:50 |
| 95217f20-5b75-41f1-9015-4756b1f22bbf | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:50 | 2018-05-20 14:06:50 |
| 0ca91ad1-14cc-425e-b5bc-2a10dd3c6850 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:51 | 2018-05-20 14:06:51 |
| e4fee159-c3f7-4496-b05c-77743d99cf3a | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:52 | 2018-05-20 14:06:52 |
| 3d962599-94bb-4cd3-bc5e-3e0488fac208 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:53 | 2018-05-20 14:06:53 |
| 453181c6-087f-4f25-9a0a-2412456e4742 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | True | 2018-05-20 14:06:54 | 2018-05-20 14:06:54 |
+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+

But when I rerun the task only one action execution will be created.

+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+
| ID | Name | Workflow name | Task name | Task ID | State | Accepted | Created at | Updated at |
+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+
| 376a8fe3-ce98-4e39-9a7a-ba8bfcf8667c | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:49 | 2018-05-20 14:06:50 |
| 95217f20-5b75-41f1-9015-4756b1f22bbf | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:50 | 2018-05-20 14:06:50 |
| 0ca91ad1-14cc-425e-b5bc-2a10dd3c6850 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:51 | 2018-05-20 14:06:51 |
| e4fee159-c3f7-4496-b05c-77743d99cf3a | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:52 | 2018-05-20 14:06:52 |
| 3d962599-94bb-4cd3-bc5e-3e0488fac208 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:53 | 2018-05-20 14:06:53 |
| 453181c6-087f-4f25-9a0a-2412456e4742 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | False | 2018-05-20 14:06:54 | 2018-05-20 14:08:07 |
| 071efd9e-332c-410d-a26b-3068185431d9 | std.fail | wf_fail | task1 | b28e2043-4d97-4e5c-a21a-615105d1bb36 | ERROR | True | 2018-05-20 14:08:07 | 2018-05-20 14:08:07 |
+--------------------------------------+----------+---------------+-----------+--------------------------------------+-------+----------+---------------------+---------------------+

Changed in mistral:
assignee: nobody → Vitalii Solodilov (mcdoker18)
Changed in mistral:
importance: Undecided → Medium
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/569643

Changed in mistral:
status: New → In Progress
Changed in mistral:
milestone: none → rocky-2
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: rocky-2 → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/569643
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=78b542c4c5e7ed6604bed4e50088690d187ab683
Submitter: Zuul
Branch: master

commit 78b542c4c5e7ed6604bed4e50088690d187ab683
Author: Vitalii Solodilov <email address hidden>
Date: Thu May 31 12:36:37 2018 +0400

    Refresh a number of retry a task when task was rerun

    Change-Id: If0a8219bb54ee0d01084dbaf5c9ed5b2041c2bc4
    Closes-Bug: #1772265
    Signed-off-by: Vitalii Solodilov <email address hidden>

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 7.0.0.0b3

This issue was fixed in the openstack/mistral 7.0.0.0b3 development milestone.

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.