retry does not work for sub WF if failed manually

Bug #1449298 reported by Winson Chan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Nikolay Makhotkin

Bug Description

In the example below, I'm expecting multiple executions of test-rollback.work and then error for test-rollback.main. Instead test-rollback.main stuck in RUNNING state and there's only 1 execution of test-rollback.work.

~$ cat ~/tmp/test-rollback.yaml
version: '2.0'
name: test-rollback

workflows:

    main:
        type: direct
        tasks:
            do:
                workflow: work
                retry:
                    count: 10
                    delay: 1

    work:
        type: direct
        tasks:
            do:
                action: std.fail
                on-error:
                    - undo
            undo:
                action: std.echo output="rolling back..."
                on-complete:
                    - fail

~$ mistral workbook-create ~/tmp/test-rollback.yaml
Starting new HTTP connection (1): localhost
+------------+----------------------------+
| Field | Value |
+------------+----------------------------+
| Name | test-rollback |
| Tags | <none> |
| Created at | 2015-04-27 23:06:39.866864 |
| Updated at | None |
+------------+----------------------------+

~$ mistral execution-create test-rollback.main
Starting new HTTP connection (1): localhost
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| ID | d67824fc-52bb-49e2-b736-067fc4ca26a6 |
| Workflow | test-rollback.main |
| State | RUNNING |
| Created at | 2015-04-27 23:06:49.022015 |
| Updated at | 2015-04-27 23:06:49.216968 |
+------------+--------------------------------------+

~$ mistral execution-list
Starting new HTTP connection (1): localhost
+--------------------------------------+------------------------------------+---------+----------------------------+----------------------------+
| ID | Workflow | State | Created at | Updated at |
+--------------------------------------+------------------------------------+---------+----------------------------+----------------------------+
| d67824fc-52bb-49e2-b736-067fc4ca26a6 | test-rollback.main | RUNNING | 2015-04-27 23:06:49.022015 | 2015-04-27 23:06:49.216968 |
| 75958b6b-444d-4851-92b9-14c3c7741354 | test-rollback.work | ERROR | 2015-04-27 23:06:49.675953 | 2015-04-27 23:06:52.452506 |
+--------------------------------------+------------------------------------+---------+----------------------------+----------------------------+

~$ mistral task-list 75958b6b-444d-4851-92b9-14c3c7741354
Starting new HTTP connection (1): localhost
+--------------------------------------+------+--------------------+--------------------------------------+---------+
| ID | Name | Workflow name | Execution ID | State |
+--------------------------------------+------+--------------------+--------------------------------------+---------+
| adc2eee2-a499-426f-9ac3-695a30256f4f | do | test-rollback.work | 75958b6b-444d-4851-92b9-14c3c7741354 | ERROR |
| dd09f069-1789-4c67-8100-257eab9ade9b | undo | test-rollback.work | 75958b6b-444d-4851-92b9-14c3c7741354 | SUCCESS |
+--------------------------------------+------+--------------------+--------------------------------------+---------+

Changed in mistral:
importance: Undecided → High
milestone: none → liberty-1
Changed in mistral:
status: New → Triaged
Changed in mistral:
assignee: nobody → Nikolay Makhotkin (nmakhotkin)
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/186053

Changed in mistral:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/186053
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=766698bd438b070cc32fa2a15cf033eddefee3c4
Submitter: Jenkins
Branch: master

commit 766698bd438b070cc32fa2a15cf033eddefee3c4
Author: Nikolay Mahotkin <email address hidden>
Date: Tue May 26 16:01:48 2015 +0300

    Fixing sending the result of subworkflow

     * This is why retry didn't work for subworkflow
     * Engine commands such as fail or succeed doesn't send the
       result of current workflow to parent workflow if needed.

    Closes-Bug: #1449298

    Change-Id: Ia0d87160a51f53a686ca0451a2000298cec5a929

Changed in mistral:
status: In Progress → Fix Committed
Changed in mistral:
status: Fix Committed → Fix Released
Changed in mistral:
milestone: liberty-1 → liberty
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.