Wrong log level passed to tenacity

Bug #1837693 reported by Kaifeng Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tooz
Fix Released
Undecided
Kaifeng Wang

Bug Description

I am debugging ironic-inspector to use tooz, the exception below occurs:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/kaifeng/community/ironic-inspector/.tox/functional-py36/lib/python3.6/site-packages/tooz/coordination.py", line 190, in _beat_forever_until_stopped
    wait_until_next_beat = retry(self._driver.heartbeat)
  File "/home/kaifeng/community/ironic-inspector/.tox/functional-py36/lib/python3.6/site-packages/tenacity/__init__.py", line 358, in call
    do = self.iter(retry_state=retry_state)
  File "/home/kaifeng/community/ironic-inspector/.tox/functional-py36/lib/python3.6/site-packages/tenacity/__init__.py", line 344, in iter
    self.before_sleep(retry_state=retry_state)
  File "/home/kaifeng/community/ironic-inspector/.tox/functional-py36/lib/python3.6/site-packages/tenacity/before_sleep.py", line 36, in log_it
    verb, value)
  File "/usr/lib/python3.6/logging/__init__.py", line 1370, in log
    raise TypeError("level must be an integer")
TypeError: level must be an integer

It appears that tooz used log.warning which is a method instead of an integer required.

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

Fix proposed to branch: master
Review: https://review.opendev.org/672402

Changed in python-tooz:
assignee: nobody → Kaifeng Wang (kaifeng)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tooz (master)

Reviewed: https://review.opendev.org/672402
Committed: https://git.openstack.org/cgit/openstack/tooz/commit/?id=a4f1288ee4234865a4db8b9c191ba275e2deef3d
Submitter: Zuul
Branch: master

commit a4f1288ee4234865a4db8b9c191ba275e2deef3d
Author: Kaifeng Wang <email address hidden>
Date: Wed Jul 24 13:14:14 2019 +0800

    Fix wrong log level during heartbeat

    It appears that tooz used log.warning which is a method
    instead of an integer required by tenacity.

    Change-Id: I0dd40f578ff0fc7bd1cd64c7889de2148ae6b06c
    Closes-Bug: #1837693

Changed in python-tooz:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tooz 1.66.1

This issue was fixed in the openstack/tooz 1.66.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.