Application context not found error in trigger tests

Bug #1395772 reported by Nikolay Makhotkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Nikolay Makhotkin

Bug Description

Sometimes we can see strange errors in our unit-tests logs:

ERROR [mistral.openstack.common.periodic_task] Error during MistralPeriodicTasks.process_cron_triggers_v2: Application context not found
Traceback (most recent call last):
File "mistral/openstack/common/periodic_task.py", line 175, in run_periodic_tasks
    task(self, context)
File "mistral/services/periodic.py", line 85, in process_cron_triggers_v2
   t.workflow_input
 File "mistral/engine1/rpc.py", line 180, in start_workflow
    auth_ctx.ctx(),
 File "mistral/context.py", line 91, in ctx
    raise exc.ApplicationContextNotFoundException()
ApplicationContextNotFoundException: Application context not found

Thats why the gates py26 and py27 are voting '-1' for commit.

We need to solve this problem.

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/137793

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

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

commit f2a5b5823208eeaa2cce252448417efc87198aed
Author: Nikolay Mahotkin <email address hidden>
Date: Fri Nov 28 17:08:16 2014 +0300

    Fix Application context not found in tests

     * The problem was in periodic service.
       Somehow triggers were executed but there is
       no invoking of periodic.setup().
       We can see trigger next execution time in our
       sqlalchemy tests is set to datetime.now and
       it causes triggers to immidiately execute. Setting
       execution time to day later solves this problem.

    Closes-bug: #1395772

    Change-Id: Iced403bdab5fd227efabc90e80f30629d85203f5

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