[openstack-dev] [neutron] ML2 plugin swallows mechanism driver exceptions

Paul Ward wpward at us.ibm.com
Tue Jan 28 23:35:49 UTC 2014


FYI - I have pushed a change to gerrit for this:
https://review.openstack.org/#/c/69748/

I went the simple route of just including the last exception encountered.

All comments and reviews welcome!!



Andre Pech <apech at aristanetworks.com> wrote on 01/24/2014 03:43:24 PM:

> From: Andre Pech <apech at aristanetworks.com>
> To: "OpenStack Development Mailing List (not for usage questions)"
> <openstack-dev at lists.openstack.org>,
> Date: 01/24/2014 03:48 PM
> Subject: Re: [openstack-dev] [neutron] ML2 plugin swallows mechanism
> driver exceptions
>
> Hey Paul,
>
> This is by design, and reraising a single MechanismDriverError was
> really to have a nice defined API for the MechanismManager class,
> avoid blanket try/except calls in the caller. But I do agree that
> it's really annoying to lose the information about the underlying
> exception. I like your idea of including the original exception text
> in the MechanismDriverError message, I think that'd help a lot.
>
> Andre
>

> On Fri, Jan 24, 2014 at 1:19 PM, Paul Ward <wpward at us.ibm.com> wrote:
> In implementing a mechanism driver for ML2 today, I discovered that
> any exceptions thrown from your mechanism driver will get swallowed
> by the ML2 manager (https://github.com/openstack/neutron/blob/
> master/neutron/plugins/ml2/managers.py at line 164).
>
> Is this by design?  Sure, you can look at the logs, but it seems
> more user friendly to reraise the exception that got us here.  There
> could be multiple mechanism drivers being called in a chain, so
> changing this to reraise an exception that got us in trouble would
> really only be able to reraise the last exception encountered, but
> it seems that's better than none at all.  Or maybe even keep a list
> of exceptions raised and put all their texts into the
> MechanismDriverError message.
>
> Thoughts?
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140128/179b2056/attachment.html>


More information about the OpenStack-dev mailing list