Workflow executed more than once when using cron-trigger with multiple engines

Bug #1513548 reported by Moshe Elisha
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Moshe Elisha

Bug Description

Scenario:

1. Start multiple Mistral engines
2. Create a cron-trigger that executes a workflow.
3. The workflow might be executed multiple times for each execution time.

Logs are attached.

Revision history for this message
Moshe Elisha (melisha) wrote :
Changed in mistral:
assignee: nobody → Moshe Elisha (melisha)
Changed in mistral:
milestone: none → mitaka-1
importance: Undecided → High
status: New → Confirmed
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/243234

Changed in mistral:
status: Confirmed → In Progress
tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/243234
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=7f9c0c62419888201e129282ba9d548d5fffdff5
Submitter: Jenkins
Branch: master

commit 7f9c0c62419888201e129282ba9d548d5fffdff5
Author: Moshe Elisha <email address hidden>
Date: Mon Nov 9 17:20:35 2015 +0000

    Ensure only one WF execution for every CT cycle

    Make sure that only one engine starts a workflow for every cron
    trigger cycle by checking the row count of the DML statements used
    to update the cron trigger in the DB:
    * Modify the update cron trigger to include a WHERE statement that
      verifies that no other engine already updated the cron trigger.
    * Change the sqlachemy method used for deleting the cron trigger to be
      able to retrieve the row count of the deleted rows

    Start the workflow execution only if the current engine was able to
    update the cron trigger DB row

    Change-Id: I9d3bec51844de218a46cf6ff53bedf9a00069e30
    Closes-Bug: #1513548

Changed in mistral:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/250206

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/liberty)

Reviewed: https://review.openstack.org/250206
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=b2aa9810ff9f8b3f160b4fc2e66c33cb103160a3
Submitter: Jenkins
Branch: stable/liberty

commit b2aa9810ff9f8b3f160b4fc2e66c33cb103160a3
Author: Moshe Elisha <email address hidden>
Date: Mon Nov 9 17:20:35 2015 +0000

    Ensure only one WF execution for every CT cycle

    Make sure that only one engine starts a workflow for every cron
    trigger cycle by checking the row count of the DML statements used
    to update the cron trigger in the DB:
    * Modify the update cron trigger to include a WHERE statement that
      verifies that no other engine already updated the cron trigger.
    * Change the sqlachemy method used for deleting the cron trigger to be
      able to retrieve the row count of the deleted rows

    Start the workflow execution only if the current engine was able to
    update the cron trigger DB row

    Change-Id: I9d3bec51844de218a46cf6ff53bedf9a00069e30
    Closes-Bug: #1513548
    (cherry picked from commit 7f9c0c62419888201e129282ba9d548d5fffdff5)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/mistral 2.0.0.0b1

This issue was fixed in the openstack/mistral 2.0.0.0b1 development milestone.

Changed in mistral:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/mistral 1.0.1

This issue was fixed in the openstack/mistral 1.0.1 release.

Changed in mistral:
milestone: mitaka-1 → 2.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/mistral 1.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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