<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 7/10/14, 7:47 AM, Sean Dague wrote:<br>
</div>
<blockquote cite="mid:53BE7D3B.7010300@dague.net" type="cite">
<pre wrap="">Honestly, that seems weird to me.
oslo.db is built as a common layer for OpenStack services.
eventlet is used by most OpenStack services.
There are lots of known issues with eventlet vs. our db access patterns.
Knowing that the db layer works in the common OpenStack pattern seems
really important. And something that seems to make sense very close to
the db code itself.</pre>
</blockquote>
<br>
Yeah I am +1 on this, the use of eventlet is very prominent
throughout openstack components, and oslo.db is intended as a "glue"
layer between SQLAlchemy and those apps. The patterns that are
used with eventlet should be tested at the oslo.db level, as oslo.db
is responsible for configuration of the driver and additionally IMO
should be taking on a much greater role in establishing
transactional patterns which also have an impact on these issues.<br>
<br>
SQLAlchemy itself never spawns any threads. However, we certainly
have a crap-ton of tests that test the connection pool and other
concurrency-sensitive areas in the context of many threads being
run. It's a critical use case so we test against it.<br>
<br>
oslo.db should at every turn be attempting to remove redundancy from
downstream projects. If ten projects all use eventlet, they
shouldn't all have to replicate the same test over and over that
should just be upwards of them.<br>
<br>
<br>
<br>
<br>
<br>
<blockquote cite="mid:53BE7D3B.7010300@dague.net" type="cite">
<pre wrap="">
-Sean
On 07/10/2014 07:42 AM, Victor Sergeyev wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello Angus!
IMO, the simple answer on your question is - tests for eventlet and
oslo.db interaction should be in the same place, where eventlet and
oslo.db interact. :)
A little digression - we suppose, that oslo.db should neither know, nor
take care whether target projects use eventlet/gevent/OS
threads/multiple processes/callbacks/etc for handling concurrency -
oslo.db just can't (and should not) make such decisions for users. For
the very same reason SQLAlchemy doesn't do that.
Thanks,
Victor
On Thu, Jul 10, 2014 at 10:55 AM, Angus Lees <<a class="moz-txt-link-abbreviated" href="mailto:guslees@gmail.com">guslees@gmail.com</a>
<a class="moz-txt-link-rfc2396E" href="mailto:guslees@gmail.com"><mailto:guslees@gmail.com></a>> wrote:
We have an issue with neutron (and presumably elsewhere), where
mysqldb and eventlet may deadlock, until the mysqldb deadlock timer
fires.
I believe it's responsible for ~all of these failures:
<a class="moz-txt-link-freetext" href="http://logstash.openstack.org/#eyJzZWFyY2giOiJcIkxvY2sgd2FpdCB0aW1lb3V0IGV4Y2VlZGVkOyB0cnkgcmVzdGFydGluZyB0cmFuc2FjdGlvblwiIiwiZmllbGRzIjpbXSwib2Zmc2V0IjowLCJ0aW1lZnJhbWUiOiI2MDQ4MDAiLCJncmFwaG1vZGUiOiJjb3VudCIsInRpbWUiOnsidXNlcl9pbnRlcnZhbCI6MH0sInN0YW1wIjoxNDA0OTcwMzgwMjc0fQ==">http://logstash.openstack.org/#eyJzZWFyY2giOiJcIkxvY2sgd2FpdCB0aW1lb3V0IGV4Y2VlZGVkOyB0cnkgcmVzdGFydGluZyB0cmFuc2FjdGlvblwiIiwiZmllbGRzIjpbXSwib2Zmc2V0IjowLCJ0aW1lZnJhbWUiOiI2MDQ4MDAiLCJncmFwaG1vZGUiOiJjb3VudCIsInRpbWUiOnsidXNlcl9pbnRlcnZhbCI6MH0sInN0YW1wIjoxNDA0OTcwMzgwMjc0fQ==</a>
Now, the fix is one thing and is underway (the current favourite
option is just switching to a different mysql client library) - my
question here is instead about this test:
<a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/104436/">https://review.openstack.org/#/c/104436/</a>
This test (as written) is against oslo.db and drives eventlet +
sqlalchemy to confirm that the current sqlalchemy driver does _not_
have the above deadlock observed with mysqldb. I think it (or some
version of it) is an important test, but the oslo.db guys don't want
it in their testsuite since they've purged every explicit mention of
eventlet. I'm sympathetic to this pov.
I think we should have something like this test *somewhere*, at
least as long as we're using eventlet frequently.
I'm a bit new to openstack, so I'm lost in a maze of testing
options. Could some kind member of the TC point to where this test
*should* go?
--
- Gus
_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:OpenStack-dev@lists.openstack.org"><mailto:OpenStack-dev@lists.openstack.org></a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>