<div dir="ltr">I think there's little to add to what Aaron said.<div><br></div><div>This mechanism might end up generating long-running sql transactions which have a detrimental effect on the availability of connections in the pool as well as the threat of the deadlock with eventlet.</div>
<div>We are progressively removing all the controller API calls nested within DB transactions from the plugin we maintain; this is not easy as it often requires to override methods from the database base class and mixins, however I think ML2 pre/post commit architecture should make this better.</div>
<div><br></div><div>Salvatore</div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 5 December 2013 00:56, Aaron Rosen <span dir="ltr"><<a href="mailto:aaronorosen@gmail.com" target="_blank">aaronorosen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">In my experience doing any kind of http request inside a of a db transaction kills performance vastly (and can lead to situations where deadlock often occurs due to eventlet+sqlalchemly). This topic also was recently discussed here:  <a href="http://lists.openstack.org/pipermail/openstack-dev/2013-November/019624.html" target="_blank">http://lists.openstack.org/pipermail/openstack-dev/2013-November/019624.html</a><div>

<br></div><div>Best, <br><br></div><div>Aaron</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 4, 2013 at 9:15 AM, Mohammad Banikazemi <span dir="ltr"><<a href="mailto:mb@us.ibm.com" target="_blank">mb@us.ibm.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div>
<p><font face="sans-serif">Have a question regarding calling an external SDN controller in a plugin. The ML2 model brings up the fact that it is preferred not to call an external controller within a database session by splitting up each call into two calls: *_precommit and *_postcommit. Makes sense.</font><br>


<br>
<font face="sans-serif">Looking at the existing monolithic plugins, I see some plugins that do not follow this approach and have the call to the controller from within a session. The obvious benefit of this approach would be a simpler cleanup code segment for cases where the call to controller fails. So my question is whether it is still OK to use this simpler approach in monolithic plugins. As we move to the ML2 model, we will be using the ML2 approach but in the meantime, we leave the option of calling the controller within a session as an OK option. Would that be reasonable?</font><span><font color="#888888"><br>


<br>
<font face="sans-serif">-Mohammad</font><br>
<br>
<br>
</font></span></p></div><br></div></div>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">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></blockquote></div><br></div>
<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></blockquote></div><br></div>