[openstack-dev] [Oslo.db] Eventlet in db (was, Replacing Glance DB code to Oslo DB code.)
Joshua Harlow
harlowja at yahoo-inc.com
Tue Aug 20 17:09:49 UTC 2013
Ok, that’s good.
I don't think the following though would work. Maybe something else is needed?
try:
import eventlet
eventlet_on = True
except ImportError:
eventlet_on = False
Due to how oslo.db could be used the environment may actually have eventlet installed (say a server running keystone and nova-api at the same time). The first project (keystone) might not want to use eventlet (but it might be in the python module path, while nova-api on the same box would want to use it). So we might need a more advanced configuration setting to make this tunable (and not depend on the python import statement to be that tunable setting).
From: Ben Nemec <openstack at nemebean.com<mailto:openstack at nemebean.com>>
Reply-To: "openstack at nemebean.com<mailto:openstack at nemebean.com>" <openstack at nemebean.com<mailto:openstack at nemebean.com>>, OpenStack Development Mailing List <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Monday, August 19, 2013 9:41 PM
To: "openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [Glance] Replacing Glance DB code to Oslo DB code.
On 08/19/13 20:34, Joshua Harlow wrote:
Just a related question,
Oslo 'incubator' db code I think depends on eventlet. This means any code that uses the oslo.db code could/would(?) be dependent on eventlet.
Will there be some refactoring there to not require it (useful for projects that are trying to move away from eventlet).
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/db/sqlalchemy/session.py#L248
Glancing through that file, it looks like the greenthread import is only used for playing nice with other greenthreads. It should be pretty easy to make it conditional so we don't require it, but will use it if it's available.
-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130820/ef7fcafb/attachment.html>
More information about the OpenStack-dev
mailing list