Preserve traceback in re-raised exception in Cisco plugin

Bug #1213159 reported by Paul Michali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Paul Michali

Bug Description

Improve the handling of re-raised exceptions to preserve the traceback information in the Cisco plugin, as needed.

In particular, in cisco_nexus_network_driver_v2.py nxos_connect() may re-raise an exception under a different type, but will loose the T/B info for the original exception. Determine if the T/B should be propagated, or left.

Analyze other cases where exceptions are rethrown to see if they need the
T/B preserved.

Tags: cisco
Paul Michali (pcm)
Changed in neutron:
assignee: nobody → Paul Michali (pcm)
Paul Michali (pcm)
tags: added: grizzly-backport-potential
Changed in neutron:
importance: Undecided → Low
status: New → Triaged
Paul Michali (pcm)
Changed in neutron:
status: Triaged → In Progress
Revision history for this message
Paul Michali (pcm) wrote :

After analyzing the code, altered the description to better reflect the goals of the bug.

For the case mentioned, and for some of the cases where database exceptions are re-thrown, we don't need to preserve the T/B, IMHO. However, there are other cases where the exception processing code can be cleaned up.

description: updated
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/43508

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

Reviewed: https://review.openstack.org/43508
Committed: http://github.com/openstack/neutron/commit/cf1af8d282cd549ff554c7e1f5663cd3999d843e
Submitter: Jenkins
Branch: master

commit cf1af8d282cd549ff554c7e1f5663cd3999d843e
Author: Paul Michali <email address hidden>
Date: Fri Aug 23 11:47:24 2013 -0400

    Analyze re-raised exceptions in Cisco Plugin

    Checked all cases of re-raised exceptions. In several cases, the exception
    was redundant (re-raising the same exception), so the try block and
    exception handling was removed.

    In one case, exceptions raised from two sources were re-raised with a
    a different exception. Instead of doing this, the original exceptions
    were changed and the try block and re-raised exception were removed.

    In cases where there were database exceptions that were re-raised as
    Neutron exceptions, the traceback was left as-is, since it was more
    informative to know the higher level source of the issue.

    The same was true for the exception mentioned in the bug, where the
    original failure was in the ncclient library parsing the configuration
    and it would be more descriptive to know that there was a connection
    failure or a config failure, that to know the library method.

    bug 1213159

    Change-Id: Ie334d2548bf651c61e878bf797adaf8c5880eb86

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-3
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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