MechanismDriverError hides original exception

Bug #1273730 reported by Paul Ward
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Hong Hui Xiao

Bug Description

In implementing a mechanism driver for ML2, I see that any exceptions raised by the mechanism driver are swallowed and all that's bubbled up to the user is the generic MechanismDriverError. This happens in MechanismManager_call_on_drivers() in https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/managers.py.

It would be nice if the MechanismDriverError at least contained the exception details from the last exception encountered in the driver chain.

Paul Ward (wpward)
Changed in neutron:
assignee: nobody → Paul Ward (wpward)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/69748

Changed in neutron:
status: New → In Progress
Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Low
Ryan Moats (rmoats)
Changed in neutron:
assignee: Paul Ward (wpward) → nobody
Changed in neutron:
assignee: nobody → Hong Hui Xiao (xiaohhui)
Revision history for this message
Hong Hui Xiao (xiaohhui) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/327500
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8398ec0d771dd8e4944034ec2e658c747671de3e
Submitter: Jenkins
Branch: master

commit 8398ec0d771dd8e4944034ec2e658c747671de3e
Author: Hong Hui Xiao <email address hidden>
Date: Sat Aug 20 09:06:10 2016 -0400

    Add mechanism driver error details to MechanismDriverError

    Now the ML2 core plugin maps driver errors to MechanismDriverError
    and hides the error details from the caller.

    This patch change MechanismDriverError from an instance of
    NeutronException to an instance of MultipleExceptions. Add add
    exceptions from mechanism driver as inner_exceptions of
    MultipleExceptions. As a result, the api layer will unwrap the
    MechanismDriverError and return the real error to client.

    Change-Id: I3a46932848d59f7f027640bfb598650f064b0a12
    Closes-bug: #1273730

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/361690

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/361690
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3e9c943f535825c6e3a618f4924f088c35838e83
Submitter: Jenkins
Branch: master

commit 3e9c943f535825c6e3a618f4924f088c35838e83
Author: Hong Hui Xiao <email address hidden>
Date: Sat Aug 27 22:36:09 2016 -0400

    Use MultipleExceptions from neutorn-lib

    [1] [2] are merged recently, which brings the deprecation warning. This
    patch eliminates the warning.

    [1] 8398ec0d771dd8e4944034ec2e658c747671de3e
    [2] 9f09f27c5dca38714be3f4494752cf84299a7965

    Change-Id: I94b6cbb314cf73becd1754e26b480bc8e8f3d49c
    Related-bug: #1273730

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.0.0.0b3

This issue was fixed in the openstack/neutron 9.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.