User new log style where Logger.exception() is used by passing an exception object as the first argument.

Bug #1529534 reported by Hua Wang
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Undecided
LiuNanke
Glance Client
New
Undecided
HouMing Wang
Magnum
Fix Released
Undecided
Hua Wang
OpenStack Compute (nova)
Confirmed
Wishlist
Alexey Stupnikov
OpenStack DBaaS (Trove)
Fix Released
Wishlist
Trevor McCasland
python-neutronclient
Confirmed
Low
Unassigned
python-troveclient
Invalid
Undecided
Unassigned

Bug Description

Use new log style where Logger.exception() is used by passing an exception object as the first argument[1].

[1]http://docs.openstack.org/developer/oslo.log/usage.html#no-more-implicit-conversion-to-unicode-str

Hua Wang (humble00)
Changed in magnum:
assignee: nobody → Hua Wang (humble00)
description: updated
Hua Wang (humble00)
summary: - User new log style where Logger.error() is used by passing an exception
- object as the first argument.
+ User new log style where Logger.exception() is used by passing an
+ exception object as the first argument.
Hua Wang (humble00)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
Changed in ironic:
assignee: nobody → Hou Ming Wang (houming-wang)
Changed in manila:
assignee: nobody → Hou Ming Wang (houming-wang)
Changed in sahara:
assignee: nobody → Hou Ming Wang (houming-wang)
Changed in python-keystoneclient:
assignee: nobody → Hou Ming Wang (houming-wang)
Changed in python-neutronclient:
assignee: nobody → Hou Ming Wang (houming-wang)
Changed in python-glanceclient:
assignee: nobody → Hou Ming Wang (houming-wang)
Shuquan Huang (shuquan)
Changed in python-ironicclient:
assignee: nobody → Shuquan Huang (shuquan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: New → In Progress
Shuquan Huang (shuquan)
Changed in ironic-inspector:
assignee: nobody → Shuquan Huang (shuquan)
Changed in ironic-lib:
assignee: nobody → Shuquan Huang (shuquan)
Changed in ironic-python-agent:
assignee: nobody → Shuquan Huang (shuquan)
Changed in ceilometer:
assignee: nobody → Chaozhe Chen (chaozhe-chen)
Changed in python-ceilometerclient:
assignee: nobody → Chaozhe Chen (chaozhe-chen)
Changed in trove:
assignee: nobody → Chaozhe Chen (chaozhe-chen)
Changed in python-troveclient:
assignee: nobody → Chaozhe Chen (chaozhe-chen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-inspector (master)

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

Changed in ironic-inspector:
status: New → In Progress
ke liang (ke-liang)
Changed in gnocchi:
assignee: nobody → ke liang (ke-liang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-lib (master)

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

Changed in ironic-lib:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Changed in ironic-python-agent:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-python-agent (master)

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

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

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

Changed in manila:
status: New → In Progress
ke liang (ke-liang)
Changed in python-gnocchiclient:
assignee: nobody → ke liang (ke-liang)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

The bug description is not clear.

The referred link to oslo.log documentation is just to recommended to use text_type(error) when passing an exception object directly to LOG.error/exception or other methods.

At least, the bug tile is wrong.
It is not specific to LOG.exception.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-ironicclient (master)

Change abandoned by Shuquan Huang (huang.shuquan@99cloud.net) on branch: master
Review: https://review.openstack.org/261900
Reason: There is no logging exception here. It's no longer affecting python-ironicclient.

Shuquan Huang (shuquan)
no longer affects: python-ironicclient
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-inspector (master)

Change abandoned by Shuquan Huang (huang.shuquan@99cloud.net) on branch: master
Review: https://review.openstack.org/261915
Reason: The conversion happens automatically.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-lib (master)

Change abandoned by Shuquan Huang (huang.shuquan@99cloud.net) on branch: master
Review: https://review.openstack.org/261918

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic-python-agent (master)

Change abandoned by Shuquan Huang (huang.shuquan@99cloud.net) on branch: master
Review: https://review.openstack.org/261922

Shuquan Huang (shuquan)
no longer affects: ironic-python-agent
no longer affects: ironic-inspector
no longer affects: ironic-lib
LiuNanke (nanke-liu)
Changed in nova:
assignee: nobody → LiuNanke (nanke-liu)
status: New → In Progress
Changed in gnocchi:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-gnocchiclient (master)

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

Changed in python-gnocchiclient:
status: New → In Progress
Revision history for this message
Akihiro Motoki (amotoki) wrote :

In neutronclient there are only two places to hit this bug.

Changed in python-neutronclient:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Akihiro Motoki (amotoki) wrote :
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I hope a hacking check rule to avoid similar errors again.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on gnocchi (master)

Change abandoned by ke liang (<email address hidden>) on branch: master
Review: https://review.openstack.org/262115

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-gnocchiclient (master)

Change abandoned by ke liang (<email address hidden>) on branch: master
Review: https://review.openstack.org/262130

ke liang (ke-liang)
Changed in gnocchi:
assignee: ke liang (ke-liang) → nobody
ke liang (ke-liang)
Changed in python-gnocchiclient:
assignee: ke liang (ke-liang) → nobody
LiuNanke (nanke-liu)
Changed in cinder:
assignee: nobody → LiuNanke (nanke-liu)
status: New → In Progress
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

This is invalid. An exception object should not be passed to log.exception. That logs whatever exception is in scope, so passing in the exception results in it being logged twice.

If passing to log.error, six.text_type is recommended.

Changed in cinder:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by LiuNanke (<email address hidden>) on branch: master
Review: https://review.openstack.org/262263

Changed in cinder:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by HouMing Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/261926

no longer affects: manila
ke liang (ke-liang)
no longer affects: python-gnocchiclient
no longer affects: gnocchi
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by LiuNanke (<email address hidden>) on branch: master
Review: https://review.openstack.org/262263

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by HouMing Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/261919

no longer affects: ironic
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/261878
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=b9435c4efeef9f31dab2f1012e7a7364f7054197
Submitter: Jenkins
Branch: master

commit b9435c4efeef9f31dab2f1012e7a7364f7054197
Author: Hua Wang <email address hidden>
Date: Mon Dec 28 11:35:50 2015 +0800

    Don't add exception in msg when using LOG.exception

    LOG.exception can record the exception automatically, so we should
    add exception in msg.

    Change-Id: I60694fd8d1b1c0bd62461900c6746a0cc300cf5b
    Closes-Bug: #1529534

Changed in magnum:
status: In Progress → Fix Released
Changed in python-keystoneclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

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

Changed in python-neutronclient:
assignee: HouMing Wang (houming-wang) → YanFeng Sun (ifeng9-sun)
status: Confirmed → In Progress
Revision history for this message
Amrith Kumar (amrith) wrote :

This doesn't seem to rise to the level of importance to warrant rushing into Mitaka given how many places it will change. But, that's my opinion.

Changed in trove:
importance: Undecided → Wishlist
milestone: none → next
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b2

This issue was fixed in the openstack/horizon 9.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Nanke_Liu (lnk) (<email address hidden>) on branch: master
Review: https://review.openstack.org/262110

gordon chung (chungg)
no longer affects: ceilometer
no longer affects: python-ceilometerclient
Changed in cinder:
status: In Progress → Invalid
no longer affects: sahara
Changed in nova:
status: In Progress → Confirmed
assignee: LiuNanke (nanke-liu) → nobody
Revision history for this message
Amrith Kumar (amrith) wrote :

inactive for 3 months in Trove

Changed in trove:
assignee: Chaozhe Chen (chaozhe-chen) → nobody
Changed in nova:
assignee: nobody → venkatamahesh (venkatamaheshkotha)
Changed in nova:
importance: Undecided → Wishlist
assignee: venkatamahesh (venkatamaheshkotha) → nobody
no longer affects: python-keystoneclient
Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

The anchor on your link seems to no longer exist. Could you give us an up-to-date reference? Otherwise I'm not sure anything should be done for glance/glanceclient.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 2.0.0

This issue was fixed in the openstack/magnum 2.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-neutronclient (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/266815
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Akihiro Motoki (amotoki)
tags: added: low-hanging-fruit
Changed in python-neutronclient:
status: In Progress → Confirmed
Revision history for this message
Trevor McCasland (twm2016) wrote :
Changed in trove:
status: New → Fix Released
assignee: nobody → Trevor McCasland (twm2016)
Changed in python-troveclient:
assignee: Chaozhe Chen (chaozhe-chen) → nobody
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
assignee: YanFeng Sun (ifeng9-sun) → nobody
Revision history for this message
Zhao Chao (zhaochao1984) wrote :

I think we can set this to 'Invalid', as troveclient does not use olso_log.

Changed in python-troveclient:
status: New → Invalid
Changed in nova:
assignee: nobody → Oleksiy Petrenko (enacero)
Changed in nova:
assignee: Oleksiy Petrenko (enacero) → nobody
Changed in nova:
assignee: nobody → Alexey Stupnikov (astupnikov)
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.