client_plugin.ignore_not_found() loses traceback

Bug #1495714 reported by Zane Bitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Oleksii Chuprykov

Bug Description

Because it only takes an exception argument, and not a exc_info tuple, the ignore_not_found() method discards the original traceback when it re-raises the exception. This makes it impossible to determine from the logs where an exception was raised. It would be much better if this method were to use the

  raise exc_type, exc_val, traceback

syntax to preserve the original traceback.

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

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

Changed in heat:
assignee: nobody → Oleksii Chuprykov (ochuprykov)
status: Triaged → In Progress
Changed in heat:
milestone: none → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/223662
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b9af096d4b989ea525be7380f39b5838926cb987
Submitter: Jenkins
Branch: master

commit b9af096d4b989ea525be7380f39b5838926cb987
Author: Oleksii Chuprykov <email address hidden>
Date: Tue Sep 15 18:52:10 2015 +0300

    Do not lose traceback while raising exc

    Do not lose traceback while raising exception in client_plugin module.
    It may have potentially useful info for debugging.

    Change-Id: Ibcf7a060e859a4e327d645176ea78d94f88d90d4
    Closes-Bug: #1495714

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
milestone: next → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

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

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

Reviewed: https://review.openstack.org/226508
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ba06cb401688af0d965044215ed3cc402fa7232e
Submitter: Jenkins
Branch: master

commit ba06cb401688af0d965044215ed3cc402fa7232e
Author: Zane Bitter <email address hidden>
Date: Tue Sep 22 15:10:46 2015 -0400

    Make re-raising of client exceptions safer

    Given that we are passing the exception value as a parameter to
    ignore_not_found() and its ilk, it is very unexpected that they ignore this
    parameter and instead raise whatever the last exception was. Guard against
    this by checking that we really are re-raising the same exception, and fall
    back to re-raising the correct exception with a new stack trace if not.

    Change-Id: I18a86569a9ba4ee81d943d496349a585dad74ef6
    Related-Bug: #1495714

Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-rc1 → 5.0.0
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.