With-items workflow task still runnig when concurrent sub-workflows fail

Bug #1555025 reported by Kevin Pouget
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Kevin Pouget

Bug Description

When a with-items workflow based task is executing the sub-workflows with concurrency, the task will stay in the RUNNING state if at least one sub-workflow fail.

This behavior do not occurs for with-items action based tasks. The issue is caused by a different management of the "accepted" flag for actions than sub workflows. An action is set as accepted when its state change to "SUCCESS" or "ERROR", while a sub workflow is set to "accepted" when its state change to "SUCCESS" only.

So, a with-items task wait for the termination of the concurrent executions by searching the "accepted" ones, do not catch the failed sub workflows, and then still running.

version: "2.0"

name: wb1

workflows:
  with_items:
    type: direct

    tasks:
      task1:
        with-items: i in [1, 2, 3]
        workflow: subworkflow
        on-error: task2

      task2:
        action: std.echo output="With-items failed"

  subworkflow:
    type: direct
    tasks:
      fail:
        action: std.fail

Kevin Pouget (kpouget)
Changed in mistral:
assignee: nobody → Kevin Pouget (kpouget)
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/290422

Changed in mistral:
status: New → In Progress
Changed in mistral:
milestone: none → mitaka-rc1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/290422
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=29d9e528578258428b228ff619566ad31e9c8ea0
Submitter: Jenkins
Branch: master

commit 29d9e528578258428b228ff619566ad31e9c8ea0
Author: Kevin Pouget <email address hidden>
Date: Wed Mar 9 11:59:53 2016 +0100

    Fix with-items task termination when sub-workflows fail

    When a with-items workflow based task is executing the sub-workflows
    with concurrency, the task will stay in the RUNNING state if at least
    one sub-workflow fail.

    This behavior do not occurs for with-items action based tasks.
    The issue is caused by a different management of the "accepted" flag
    for actions than sub-workflows. A with-items task wait for the
    termination of the concurrent executions by searching the "accepted"
    ones. An action is set as accepted when its state change to "SUCCESS"
    or "ERROR", while a sub-workflow is set to "accepted" when its state
    change to "SUCCESS" only.

    As for actions, this patch set the sub-workflows as accepted when fail.

    Change-Id: Ie94af2a6a037d1184d127a27ea86d0752c03b3b2
    Closes-Bug: #1555025

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/mistral 2.0.0.0rc1

This issue was fixed in the openstack/mistral 2.0.0.0rc1 release candidate.

Changed in mistral:
milestone: mitaka-rc1 → 2.0.0
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.