<html><body>
<p><font size="2" face="sans-serif">FYI - I have pushed a change to gerrit for this: <a href="https://review.openstack.org/#/c/69748/">https://review.openstack.org/#/c/69748/</a></font><br>
<br>
<font size="2" face="sans-serif">I went the simple route of just including the last exception encountered.</font><br>
<br>
<font size="2" face="sans-serif">All comments and reviews welcome!!<br>
<br>
</font><br>
<br>
<tt><font size="2">Andre Pech <apech@aristanetworks.com> wrote on 01/24/2014 03:43:24 PM:<br>
<br>
> From: Andre Pech <apech@aristanetworks.com></font></tt><br>
<tt><font size="2">> To: "OpenStack Development Mailing List (not for usage questions)" <br>
> <openstack-dev@lists.openstack.org>, </font></tt><br>
<tt><font size="2">> Date: 01/24/2014 03:48 PM</font></tt><br>
<tt><font size="2">> Subject: Re: [openstack-dev] [neutron] ML2 plugin swallows mechanism<br>
> driver exceptions</font></tt><br>
<tt><font size="2">> <br>
> Hey Paul,</font></tt><br>
<tt><font size="2">> <br>
> This is by design, and reraising a single MechanismDriverError was <br>
> really to have a nice defined API for the MechanismManager class, <br>
> avoid blanket try/except calls in the caller. But I do agree that <br>
> it's really annoying to lose the information about the underlying <br>
> exception. I like your idea of including the original exception text<br>
> in the MechanismDriverError message, I think that'd help a lot.</font></tt><br>
<tt><font size="2">> <br>
> Andre</font></tt><br>
<tt><font size="2">> <br>
</font></tt><br>
<tt><font size="2">> On Fri, Jan 24, 2014 at 1:19 PM, Paul Ward <wpward@us.ibm.com> wrote:</font></tt><br>
<tt><font size="2">> In implementing a mechanism driver for ML2 today, I discovered that <br>
> any exceptions thrown from your mechanism driver will get swallowed <br>
> by the ML2 manager (<a href="https://github.com/openstack/neutron/blob/">https://github.com/openstack/neutron/blob/</a><br>
> master/neutron/plugins/ml2/managers.py at line 164).<br>
> <br>
> Is this by design?  Sure, you can look at the logs, but it seems <br>
> more user friendly to reraise the exception that got us here.  There<br>
> could be multiple mechanism drivers being called in a chain, so <br>
> changing this to reraise an exception that got us in trouble would <br>
> really only be able to reraise the last exception encountered, but <br>
> it seems that's better than none at all.  Or maybe even keep a list <br>
> of exceptions raised and put all their texts into the <br>
> MechanismDriverError message.<br>
> <br>
> Thoughts?</font></tt><br>
<tt><font size="2">> <br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.org<br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></tt><br>
<tt><font size="2">> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> OpenStack-dev@lists.openstack.org<br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></tt></body></html>