Log message printed for unhandled exception is not very helpful.

Bug #1265561 reported by Venkatesh Sampath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Venkatesh Sampath
OpenStack Compute (nova)
Fix Released
Undecided
Mahesh Panchaksharaiah
oslo-incubator
Fix Released
Undecided
Venkatesh Sampath

Bug Description

Currently, on an unhandled exception, the error message logged through sys.excepthook is not very helpful.

Currently it prints only the exception_value.
https://github.com/openstack/oslo-incubator/blob/master/openstack/common/log.py#L396

Fix:
Make the log message print both the exception_type and exception_value of the unhandled exception.

PS: Currently the traceback is printed only when the VERBOSE is ON.

Changed in oslo:
assignee: nobody → Venkatesh Sampath (venkateshsampath)
description: updated
Changed in oslo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

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

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

Reviewed: https://review.openstack.org/64820
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=d292f7d8b0d20a29829d37aab158b38028f010c6
Submitter: Jenkins
Branch: master

commit d292f7d8b0d20a29829d37aab158b38028f010c6
Author: Venkatesh Sampath <email address hidden>
Date: Fri Jan 3 15:29:22 2014 +0530

    Add error type to unhandled exception log message

    Whenever an unhandled exception is thrown, only the exception value is printed
    as part of the log message. Printing just the value is sometimes not very
    helpful to identify the problem. eg., in case of KeyError, only the 'key_name'
    would be printed as part of the log message.
    This commit includes the exception type along with value while logging an
    unhandled exception.

    Change-Id: Ibf00173a07510b2ec0c81a29624004f17810a4e4
    Closes-Bug: #1265561

Changed in oslo:
status: In Progress → Fix Committed
Changed in glance:
assignee: nobody → Venkatesh Sampath (venkateshsampath)
status: New → In Progress
description: updated
Changed in nova:
assignee: nobody → Mahesh Panchaksharaiah (maheshp)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

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

Feilong Wang (flwang)
Changed in glance:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/68080
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=5f56945157f94e71ca02a4b86a2d6528afc99058
Submitter: Jenkins
Branch: master

commit 5f56945157f94e71ca02a4b86a2d6528afc99058
Author: Venkatesh Sampath <email address hidden>
Date: Tue Jan 21 15:59:56 2014 +0530

    Sync unhandled exception logging change from Oslo

    copy changes from 1 Oslo commit: Ibf00173a07510b2ec0c81a29624004f17810a4e4
    This is related to the bug fix for adding error type to unhandled
    exception log message

    Change-Id: I5645894aad5944f6a91032ae9ac1f2a0904661f7
    Closes-Bug: #1265561

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-2 → 2014.1
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-3 → 2014.1
Joe Gordon (jogo)
Changed in nova:
status: In Progress → Fix Released
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.