bc11f09b83
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
|
||
---|---|---|
doc/source | ||
examples | ||
tools | ||
tooz | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
LICENSE | ||
README.rst | ||
bindep.txt | ||
requirements.txt | ||
run-examples.sh | ||
setup-consul-env.sh | ||
setup-etcd-env.sh | ||
setup.cfg | ||
setup.py | ||
tox.ini |
README.rst
Tooz
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.
- Free software: Apache license
- Documentation: http://docs.openstack.org/developer/tooz
- Source: http://git.openstack.org/cgit/openstack/tooz
- Bugs: http://bugs.launchpad.net/python-tooz/