sqlalchemy impl calls back to DB API

Bug #1154811 reported by Chris Behrens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chris Behrens

Bug Description

In 3 places, sqlalchemy has calls back to the DB API:

db.instance_get_by_uuid(context, instance_uuid)
db.aggregate_get(context, aggregate_id)
db.ec2_instance_create(context, instance_ref['uuid'])

While this an eventlet bug, when tpool is enabled.. The call path ends up being:

tpool.execute { sqlalchemy_method { tpool.execute{ sqlalchemy_method } } }

eventlet tries to deal with recursive tpool.execute()s but it seems to cause lockups.

Either way, it's not necessary to call back to DB API from the sqlalchemy backend, and I think that should be avoided.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Chris Behrens (cbehrens)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/24372
Committed: http://github.com/openstack/nova/commit/cef34cd69156036c855ec217225edfce65b63d3c
Submitter: Jenkins
Branch: master

commit cef34cd69156036c855ec217225edfce65b63d3c
Author: Chris Behrens <email address hidden>
Date: Wed Mar 13 21:41:43 2013 +0000

    Remove sqlalchemy calling back to DB API

    sqlalchemy unnecessarily calls back to DB API in a few spots. It's
    more efficient to not do so.

    Also, when dbapi_use_tpool is enabled, this causes a lock up due to an
    eventlet bug.

    Fixes bug 1154811

    Change-Id: I5937a2dce85a09502f40ebcd99afb441938c1289

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.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.