initializing _facade in sqlalchemy/api.py after OSprofiler causes error

Bug #1657326 reported by Tovin Seven
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Tovin Seven

Bug Description

When I try to enable OSprofiler in Heat. I got this:

----------
'NoneType' object has no attribute 'get_engine'

at db/sqlalchemy/api.py:79
----------

Because of this commit [1], the order of initializing _facade and osprofiler had changed.
Therefore, if we enable OSprofiler, Heat will display this error.

Current initializing order:

        db_context.configure(**CONF.database)
        if CONF.profiler.enabled:
            if CONF.profiler.trace_sqlalchemy:
                osprofiler.sqlalchemy.add_tracing(sqlalchemy,
                                                  _facade.get_engine(),
                                                  "db")
        _facade = db_context.get_legacy_facade()

[1] https://review.openstack.org/#/c/330800/16/heat/db/sqlalchemy/api.py

Tovin Seven (tovin07)
Changed in heat:
assignee: nobody → Tovin Seven (tovin07)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/421635

Changed in heat:
status: New → In Progress
Rabi Mishra (rabi)
Changed in heat:
importance: Undecided → Medium
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/421635
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=936b3c3714ce55f8b30f5d7c029577aa61d79843
Submitter: Jenkins
Branch: master

commit 936b3c3714ce55f8b30f5d7c029577aa61d79843
Author: Tovin Seven <email address hidden>
Date: Wed Jan 18 09:38:30 2017 +0700

    Change order of init _facade and osprofiler

    Initialize osprofiler in sqlalchemy/api.py failed with message:

    'NoneType' object has no attribute 'get_engine'

    Re-oder to init osprofiler after _facade will fix this issue.

    Change-Id: I420f12f382c4712a692dfa440958b2e497dc22a1
    Closes-Bug: #1657326

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 8.0.0.0b3

This issue was fixed in the openstack/heat 8.0.0.0b3 development milestone.

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.