MechanismDriverError hides original exception

Bug #1273730 reported by Paul Ward on 2014-01-28
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
neutron
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) on 2014-01-28
Changed in neutron:
assignee: nobody → Paul Ward (wpward)

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

Changed in neutron:
status: New → In Progress
Kyle Mestery (mestery) on 2014-02-10
Changed in neutron:
importance: Undecided → Low
Ryan Moats (rmoats) on 2015-09-29
Changed in neutron:
assignee: Paul Ward (wpward) → nobody
Changed in neutron:
assignee: nobody → Hong Hui Xiao (xiaohhui)

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

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

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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers