<div dir="ltr">Well, we can re-define is_backend_avail() in Nova code and use it instead of oslo.db's function. it looks a bit ugly but it will be fast<div><br></div><div><div>> Also can I request that when deprecating methods in oslo libraries we</div><div>> use a standard deprecation mechanism so that warnings are emitted when</div><div>> this method is used. I didn't find anything in our unit tests logs. It</div><div><br></div><div>ok, will suggest</div><div><br></div><div>> It is odd that it exposed after the release (and not before), any idea</div><div>> which oslo.db change impacted this?</div></div><div><br></div><div>This bug depends fro python version so we haven't catch it locally :(</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 18, 2014 at 6:47 PM, Sean Dague <span dir="ltr"><<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there a more minimal version of<br>
<a href="https://review.openstack.org/#/c/103920/" target="_blank">https://review.openstack.org/#/c/103920/</a> that *just* fixes this issue.<br>
<br>
So we can evaluate the refactor on it's own, but get the bug fixed more<br>
immediately.<br>
<br>
Also can I request that when deprecating methods in oslo libraries we<br>
use a standard deprecation mechanism so that warnings are emitted when<br>
this method is used. I didn't find anything in our unit tests logs. It<br>
would be helpful to keep us ahead of this in the future.<br>
<br>
It is odd that it exposed after the release (and not before), any idea<br>
which oslo.db change impacted this?<br>
<br>
-Sean<br>
<span class=""><br>
On 11/18/2014 11:17 AM, Victor Sergeyev wrote:<br>
> Matt,<br>
><br>
> As for race in Nova - it caused by deprecated is_backend_avail()<br>
> function, which calls _ensure_backenv_available() method, which creates<br>
> a SQLAlchemy engine and opens a test connection, but doesn't call<br>
> engine.dispose(). Depending on Python interpreter version, this<br>
> connection may remain open for some time.<br>
><br>
> So there are such ways to fix Nova:<br>
> - wait for oslo.db 1.1.1 which will include fix for this method - see<br>
> patch [1]<br>
> - remove is_backend_avail() helper usage in Nova - patch [2] refactor<br>
> Nova opportunistic DB tests and remove that method.<br>
><br>
> [1] <a href="https://review.openstack.org/#/c/135293/" target="_blank">https://review.openstack.org/#/c/135293/</a><br>
> [2] <a href="https://review.openstack.org/#/c/103920/" target="_blank">https://review.openstack.org/#/c/103920/</a><br>
><br>
><br>
> On Tue, Nov 18, 2014 at 5:22 AM, Matt Riedemann<br>
</span><div><div class="h5">> <<a href="mailto:mriedem@linux.vnet.ibm.com">mriedem@linux.vnet.ibm.com</a> <mailto:<a href="mailto:mriedem@linux.vnet.ibm.com">mriedem@linux.vnet.ibm.com</a>>> wrote:<br>
><br>
><br>
><br>
> On 11/17/2014 9:36 AM, Victor Sergeyev wrote:<br>
><br>
> Hello All!<br>
><br>
> Oslo team is pleased to announce the new release of Oslo database<br>
> handling library - oslo.db 1.1.0<br>
><br>
> List of changes:<br>
> $ git log --oneline --no-merges 1.0.2..master<br>
> 1b0c2b1 Imported Translations from Transifex<br>
> 9aa02f4 Updated from global requirements<br>
> 766ff5e Activate pep8 check that _ is imported<br>
> f99e1b5 Assert exceptions based on API, not string messages<br>
> 490f644 Updated from global requirements<br>
> 8bb12c0 Updated from global requirements<br>
> 4e19870 Reorganize DbTestCase to use provisioning completely<br>
> 2a6dbcd Set utf8 encoding for mysql and postgresql<br>
> 1b41056 ModelsMigrationsSync: Add check for foreign keys<br>
> 8fb696e Updated from global requirements<br>
> ba4a881 Remove extraneous vim editor configuration comments<br>
> 33011a5 Remove utils.drop_unique_constraint()<br>
> 64f6062 Improve error reporting for backend import failures<br>
> 01a54cc Ensure create_engine() retries the initial connection test<br>
> 26ec2fc Imported Translations from Transifex<br>
> 9129545 Use fixture from oslo.config instead of oslo-incubator<br>
> 2285310 Move begin ping listener to a connect listener<br>
> 7f9f4f1 Create a nested helper function that will work on py3.x<br>
> b42d8f1 Imported Translations from Transifex<br>
> 4fa3350 Start adding a environment for py34/py33<br>
> b09ee9a Explicitly depend on six in requirements file<br>
> 7a3e091 Unwrap DialectFunctionDispatcher from itself.<br>
> 0928d73 Updated from global requirements<br>
> 696f3c1 Use six.wraps instead of functools.wraps<br>
> 8fac4c7 Update help string to use database<br>
> fc8eb62 Use __qualname__ if we can<br>
> 6a664b9 Add description for test_models_sync function<br>
> 8bc1fb7 Use the six provided iterator mix-in<br>
> 436dfdc ModelsMigrationsSync:add correct server_default check<br>
> for Enum<br>
> 2075074 Add history/changelog to docs<br>
> c9e5fdf Add run_cross_tests.sh script<br>
><br>
> Thanks Andreas Jaeger, Ann Kamyshnikova, Christian Berendt, Davanum<br>
> Srinivas, Doug Hellmann, Ihar Hrachyshka, James Carey, Joshua<br>
> Harlow,<br>
> Mike Bayer, Oleksii Chuprykov, Roman Podoliaka for contributing<br>
> to this<br>
> release.<br>
><br>
> Please report issues to the bug tracker:<br>
</div></div>> <a href="https://bugs.launchpad.net/__oslo.db" target="_blank">https://bugs.launchpad.net/__oslo.db</a><br>
> <<a href="https://bugs.launchpad.net/oslo.db" target="_blank">https://bugs.launchpad.net/oslo.db</a>><br>
><br>
><br>
> _________________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.__org<br>
> <mailto:<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>
<span class="">> <<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>
><br>
> And...the nova postgresql opportunistic DB tests are failing quite<br>
> frequently due to some race introduced by the new library version [1].<br>
><br>
</span>> [1] <a href="https://bugs.launchpad.net/__oslo.db/+bug/1393633" target="_blank">https://bugs.launchpad.net/__oslo.db/+bug/1393633</a><br>
<span class="">> <<a href="https://bugs.launchpad.net/oslo.db/+bug/1393633" target="_blank">https://bugs.launchpad.net/oslo.db/+bug/1393633</a>><br>
><br>
> --<br>
><br>
> Thanks,<br>
><br>
> Matt Riedemann<br>
><br>
><br>
><br>
</span>> _________________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.__org<br>
> <mailto:<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> <<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>
<span class="im HOEnZb">><br>
><br>
><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>
><br>
<br>
<br>
</span><span class="HOEnZb"><font color="#888888">--<br>
Sean Dague<br>
<a href="http://dague.net" target="_blank">http://dague.net</a><br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>