<div dir="ltr"><div style>This isn't something the deployer controls, so I don't know if we want it to go into a config setting.</div><div style><br></div>If we can't detect eventlet being used automatically, we could provide an initialization function in the locals module so projects could change the behavior when a process starts. The default mode would need to be eventlet, for now, but a thread-local implementation seems like an obvious alternative. And of course we would need the module to behave as it does now if the initialization is not explicitly called.<div>
<br></div><div>Doug<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 8:03 AM, Davanum Srinivas <span dir="ltr"><<a href="mailto:davanum@gmail.com" target="_blank">davanum@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lance,<br>
<br>
"is eventlet installed" a strong enough check? given that folks may<br>
pick up a python install that has eventlet installed w/o realizing it?<br>
<br>
Is there a way to check if the openstack process the code is running<br>
in is using eventlet or not? or the other choice is a flag in logging<br>
conf to switch to a non-eventlet implemenation?<br>
<br>
-- dims<br>
<div><div class="h5"><br>
On Wed, Jun 26, 2013 at 8:17 PM, Lance D Bragstad <<a href="mailto:ldbragst@us.ibm.com">ldbragst@us.ibm.com</a>> wrote:<br>
> Hey all,<br>
><br>
> Recently there has been some push to get a unified logging implementation<br>
> pulled from Oslo-incubator into Keystone (Blueprint:<br>
> <a href="https://blueprints.launchpad.net/keystone/+spec/unified-logging-in-keystone" target="_blank">https://blueprints.launchpad.net/keystone/+spec/unified-logging-in-keystone</a>).<br>
> Keystone has been actively working to isolate eventlet code within Keystone<br>
> and bringing in the current implementation from Oslo-incubator would go<br>
> against that work, as /oslo-incubator/openstack/common/log.py imports<br>
> /oslo-incubator/openstack/common/local.py which has a dependency on eventlet<br>
> (<a href="https://github.com/openstack/oslo-incubator/blob/master/openstack/common/local.py#L22" target="_blank">https://github.com/openstack/oslo-incubator/blob/master/openstack/common/local.py#L22</a>)<br>
> and is used for storing references to contexts. I know there has been a<br>
> couple of projects looking to not be dependent on eventlet and thought this<br>
> might be a good topic for the mailing list, especially if these changes end<br>
> up in Oslo-incubator.<br>
><br>
> After discussion with a couple of the Keystone members, one option is to<br>
> tweak local.py to check if eventlet is even installed (similar to def<br>
> _ensure_subprocess here:<br>
> <a href="https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/common/cms.py#L11" target="_blank">https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/common/cms.py#L11</a>)<br>

> and if it isn't then try implementing a different WeakLocal store not using<br>
> corolocal.local. Any other ideas on how to approach this are more than<br>
> welcome. Thanks!<br>
><br>
><br>
><br>
> Best Regards,<br>
><br>
> Lance Bragstad<br>
> Software Engineer - OpenStack<br>
> Cloud Solutions and OpenStack Development<br>
> T/L 553-5409, External <a href="tel:507-253-5409" value="+15072535409">507-253-5409</a><br>
> <a href="mailto:ldbragst@us.ibm.com">ldbragst@us.ibm.com</a>, Bld 015-2/C118<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Davanum Srinivas :: <a href="http://davanum.wordpress.com" target="_blank">http://davanum.wordpress.com</a><br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br></div></div></div>