Undesirable LOG in tests output

Bug #1482261 reported by Sergey Kraynev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Sirushti Murugesan
Liberty
Fix Released
Undecided
Unassigned

Bug Description

Heat tests job for py34 passes with strange output:

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.4/logging/__init__.py", line 964, in emit
    msg = self.format(record)
  File "/usr/lib/python3.4/logging/__init__.py", line 814, in format
    return fmt.format(record)
  File "/usr/lib/python3.4/logging/__init__.py", line 559, in format
    record.exc_text = self.formatException(record.exc_info)
  File "/usr/lib/python3.4/logging/__init__.py", line 509, in formatException
    traceback.print_exception(ei[0], ei[1], tb, None, sio)
  File "/usr/lib/python3.4/traceback.py", line 173, in print_exception
    for line in _format_exception_iter(etype, value, tb, limit, chain):
  File "/usr/lib/python3.4/traceback.py", line 150, in _format_exception_iter
    for value, tb in values:
  File "/usr/lib/python3.4/traceback.py", line 129, in _iter_chain
    context = exc.__context__
AttributeError: 'NoneType' object has no attribute '__context__'

After investigation, I can say, that it happens only for two tests:

test_delete_in_progress_convergence
test_update_in_progress_convergence

in test_resource module.

It happens only for LOG.exception line. If use another type error, warn, etc it will not report any strange logs, but I don't think, that it's right solution.

Changed in heat:
status: New → Triaged
Angus Salkeld (asalkeld)
Changed in heat:
importance: Low → Medium
Angus Salkeld (asalkeld)
tags: added: convergence-bugs
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/232315

Changed in heat:
status: Triaged → In Progress
Changed in heat:
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit f5c415accfff2ad399194b30b9408a903042f009
Author: Sirushti Murugesan <email address hidden>
Date: Thu Oct 8 09:13:04 2015 +0530

    Use LOG.error when no exception handler is used

    There's no need to use LOG.exception here since sys.exc_info()
    results in (None, None, None) and thus would effectively just
    be LOG.error.

    Also, the failure of invoking LOG.exception outside of an
    exception handler is due to a bug in Python3[1]. The fix for
    that is only available in Python3.5.

    [1] http://bugs.python.org/issue17911

    Closes-Bug: #1482261

    Change-Id: I9ceac0fceafa45769cc15f56027c981182ff0750

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/233210

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/liberty)

Change abandoned by Roman Podoliaka (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/234709

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/235246
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=6d611b7f9758b04cfe67bd9533d59044a7844bc7
Submitter: Jenkins
Branch: stable/liberty

commit 6d611b7f9758b04cfe67bd9533d59044a7844bc7
Author: Sirushti Murugesan <email address hidden>
Date: Thu Oct 8 09:13:04 2015 +0530

    Merge of three backported commits for fixing liberty gate

    First patch description:

    Use LOG.error when no exception handler is used

    There's no need to use LOG.exception here since sys.exc_info()
    results in (None, None, None) and thus would effectively just
    be LOG.error.

    Also, the failure of invoking LOG.exception outside of an
    exception handler is due to a bug in Python3[1]. The fix for
    that is only available in Python3.5.

    [1] http://bugs.python.org/issue17911

    Closes-Bug: #1482261
    (cherry picked from commit f5c415accfff2ad399194b30b9408a903042f009)

    Second patch description:

    Add testresources used by oslo.db fixture

    If we use oslo.db fixtures, we'll need these 2 packages or
    the next version of oslo.db release will break us.

    Closes-Bug: #1503501
    (cherry picked from commit a7368fb68e8c1cccbb601aa1aad444248c645c25)

    Third patch description:

    Switch to post-versioning

    No longer mention next version on setup.cfg on stable branch.

    Change-Id: Ib40c664a4f0e01cd27e1f24cfdbc9de278aece42

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/liberty)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/233210
Reason: Part of https://review.openstack.org/#/c/235246/.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b1

This issue was fixed in the openstack/heat 6.0.0.0b1 development milestone.

Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 5.0.1

This issue was fixed in the openstack/heat 5.0.1 release.

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.