Cron-trigger running failed when workflow's scope is updated to 'private' from 'public'

Bug #1518655 reported by Lingxian Kong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Undecided
Hardik Parekh

Bug Description

steps to reproduce:

1. Tenant1 creates a 'public' workflow.
2. Tenant2 can see that workflow, and creates a cron-trigger using that workflow.
3. Tenant1 updates the scope of workflow from 'public' to 'private'.
4. Cron-trigger's execution fails, the error log:

2015-11-21 09:03:59.379 8645 ERROR mistral.engine.default_engine [-] Failed to start workflow 'simple_wf' id=None: Workflow not found [workflow_name=simple_wf]
Traceback (most recent call last):
  File "/vagrant/mistral/mistral/engine/default_engine.py", line 62, in start_workflow
    wf_def = db_api.get_workflow_definition(wf_name)
  File "/vagrant/mistral/mistral/db/v2/api.py", line 107, in get_workflow_definition
    return IMPL.get_workflow_definition(name)
  File "/vagrant/mistral/mistral/db/v2/sqlalchemy/api.py", line 255, in get_workflow_definition
    "Workflow not found [workflow_name=%s]" % name
NotFoundException: Workflow not found [workflow_name=simple_wf]

2015-11-21 09:03:59.384 8645 ERROR mistral.engine.default_engine [-] Cant fail workflow execution with id='None': not found.
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher [-] Exception during message handling: Workflow not found [workflow_name=simple_wf]
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/vagrant/mistral/mistral/engine/rpc.py", line 98, in start_workflow
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher **params
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/vagrant/mistral/mistral/utils/__init__.py", line 112, in _logged
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher return func(*args, **kw)
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher File "/vagrant/mistral/mistral/engine/default_engine.py", line 105, in start_workflow
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher raise e
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher NotFoundException: Workflow not found [workflow_name=simple_wf]
2015-11-21 09:03:59.385 8645 ERROR oslo_messaging.rpc.dispatcher
2015-11-21 09:03:59.394 8645 ERROR oslo_messaging._drivers.common [-] Returning exception Workflow not found [workflow_name=simple_wf] to caller

Changed in mistral:
assignee: nobody → hardik (hardik-parekh047)
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/252317

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

Reviewed: https://review.openstack.org/252317
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=3074df9f46ad35906fd7970d4bede8df77b3ec34
Submitter: Jenkins
Branch: master

commit 3074df9f46ad35906fd7970d4bede8df77b3ec34
Author: hparekh <email address hidden>
Date: Tue Jan 5 11:32:52 2016 +0900

    Disallow user to change workflow scope

    If workflow has any cron-trigger assoaciated
    outside of the workflow's tenant, user is
    not allowed to change its scope from 'public'
    to 'private'.

    Change-Id: I90bd903d46140af26a729d62176e079e02406eae
    Closes-bug: #1518655

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