Coordinate distributed systems.
Go to file
Julien Danjou bc11f09b83 Rewrite heartbeat runner with event
The current implementation uses an event attached to the Heart class to detect
if the thread is done. Since the thread is a daemon, it might be killed after
the interpreter is done, especially if an application is killed before calling
stop() on the coordinator. This results in the following backtrace:

Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 754, in run
  File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 250, in wrapper
  File "/usr/local/lib/python2.7/dist-packages/tooz/coordination.py", line 206, in _beat_forever_until_stopped
  File "/usr/lib/python2.7/threading.py", line 585, in set
  File "/usr/lib/python2.7/threading.py", line 407, in notifyAll
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

This patches simplifies the heart class by using the thread status rather than
an event to check if it's alive and wait for it to stop.

Change-Id: I03ccbefd3d68e9dd85ea23a3840d606d1ffc80bb
(cherry picked from commit 3253241376)
2017-06-30 01:27:30 +00:00
doc/source Add docs for new consul driver 2016-06-13 14:16:03 -07:00
examples doc: switch examples to Zake 2014-11-18 15:39:05 +01:00
tools Add docs for new consul driver 2016-06-13 14:16:03 -07:00
tooz Rewrite heartbeat runner with event 2017-06-30 01:27:30 +00:00
.coveragerc Add standard code coverage configuration file 2015-10-02 09:09:41 -04:00
.gitignore Add .tox, *.pyo and *.egg to .gitignore 2016-02-10 10:23:12 +00:00
.gitreview Update .gitreview for stable/newton 2016-08-29 16:14:05 -04:00
.testr.conf Enable OS_LOG_CAPTURE so that logs can be seen (on error) 2016-02-08 14:58:22 -08:00
LICENSE First commit of Tooz 2013-12-19 12:18:35 +01:00
README.rst Switch badges from 'pypip.in' to 'shields.io' 2015-06-11 20:44:26 -07:00
bindep.txt Install only needed packages 2017-06-27 19:45:14 +02:00
requirements.txt Updated from global requirements 2016-07-18 00:04:57 +00:00
run-examples.sh Have examples run in the py27 environment and make them work 2014-09-19 11:57:56 -07:00
setup-consul-env.sh Use pifpaf to setup daemons 2016-06-09 10:40:16 +02:00
setup-etcd-env.sh Use pifpaf to setup daemons 2016-06-09 10:40:16 +02:00
setup.cfg Updated from global requirements 2016-06-21 18:07:05 +00:00
setup.py Updated from global requirements 2015-09-17 12:17:45 +00:00
tox.ini etcd: properly block when using 'wait' 2016-07-20 16:50:16 +03:00

README.rst

Tooz

Latest Version

Downloads

The Tooz project aims at centralizing the most common distributed primitives like group membership protocol, lock service and leader election by providing a coordination API helping developers to build distributed applications.

Join us