Periodic triggers stopped working

Bug #1335758 reported by Kirill Izotov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Undecided
Ray Chen

Bug Description

The trigger section of mistral-extra's webhook produces an error (see trace below) instead of periodically execute the task.

To reproduce:
Run mistral-extra's webhook example.

Trace:
2014-06-30 14:54:03.937 53141 ERROR mistral.openstack.common.periodic_task [-] Error during MistralPeriodicTasks.scheduler_triggers: Application context not found
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task Traceback (most recent call last):
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/openstack/common/periodic_task.py", line 175, in run_periodic_tasks
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task task(self, context)
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/services/periodic.py", line 43, in scheduler_triggers
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task wb = db_api.workbook_get(trigger['workbook_name'])
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/db/api.py", line 62, in workbook_get
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task return IMPL.workbook_get(name)
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/db/sqlalchemy/api.py", line 88, in decorator
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task res = func(*args, **kwargs)
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/db/sqlalchemy/api.py", line 333, in workbook_get
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task workbook = _workbook_get(workbook_name)
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/db/sqlalchemy/api.py", line 133, in _within_session
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task result = func(*args, **kw)
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/db/sqlalchemy/api.py", line 357, in _workbook_get
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task project_id=context.ctx().project_id).first()
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task File "/Users/enykeev/Developer/Work/Openstack/mistral/mistral/context.py", line 85, in ctx
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task raise exc.ApplicationContextNotFoundException()
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task ApplicationContextNotFoundException: Application context not found
2014-06-30 14:54:03.937 53141 TRACE mistral.openstack.common.periodic_task

Ray Chen (chenrano2002)
Changed in mistral:
assignee: nobody → Ray Chen (chenrano2002)
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/106618

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/106618
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=c8fc3ebdc0fec3c76455986273ef36ddbf334d6f
Submitter: Jenkins
Branch: master

commit c8fc3ebdc0fec3c76455986273ef36ddbf334d6f
Author: Ray Chen <email address hidden>
Date: Sun Jul 13 21:25:37 2014 +0800

    The schedule triggers need to setup admin context before run.

    The workbook_get db api will use 'project_id' to filter workbook.
    We have to well setup intial admin context before periodic task.

    Change-Id: I45c4d6bb30b215fdd681fc01606e829cf6def93e
    Closes-Bug: #1335758

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