This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I00c02762c4c6dfa3a0cfa1dc2262f2ed98256ace
list-table is easier to be maintained.
In addition, we avoid too long lines.
We no longer have too long lines which doc8 complains,
so doc8 ignore_path can be dropped.
Change-Id: I574391295288ef9e33744aa608c2f2930a6e46f8
- Update sphinx so that warning-is-error option is available
- Fix sphinx warnings
- Install python modules required for automodule into docs env
- Fix docstring warning in tooz/coordination.py
- pbr warnerrors is no longer needed in favor of sphinx warning-is-error
Change-Id: I5d54c452522b6ee00884d7d17105af22b4c95189
- add a test to be sure that no lock refresh is made on non-acquired locks
- add thread safety for etcd3 drivers on heartbeat() (like Redis)
Change-Id: I350ea10163d59a06712c22c4c5be4dfcb6885bf8
The code in python-etcd3 for locks has been adjusted to reflect how tooz wants
his lock to work. That's amazing because now we can use them directly and not
implement our own locking mechanism!
Change-Id: Ia5741bae83cddd90f9bb78fba9173dca8509e6d9
The capabilities was meant to be a byte string only, but since now all drivers
have been enhanced to serialize the data in a way or another, it accepts
anything. There's no need to pass a byte string anymore.
Change-Id: Ib732dccd18d67edd9e39e990b8ca3a8da7ab5663
The connection is supposedly closed when blocking is False and the lock is not
acquired. Or when an exception happens in the locking code.
But if blocking is e.g. 5 seconds, then RetryError is raised but without
closing any connection at the end. This fixes that.
Change-Id: I7b40e466fe5fc01ee3f8c012f765aafca9ce716a
gRPC (used by python-etcd3) is not able to work correctly with fork. One can
only use it in the child or master process, but not both. Therefore this test
will fail or hang forever.
Change-Id: I32453d2d968faefeffcff1f5b70b46daec36c300
This should make it easy to run any Python version test, e.g. Python 3.6,
without any further change.
Change-Id: I91a47b736371549e50b7c7fd60e46e0f87c357ae
Using grpc to directly access etcd3 does not work well with
eventlet based services. So we need to use the grpc HTTP
gateway API (/v3alpha).
https://coreos.com/etcd/docs/latest/dev-guide/api_grpc_gateway.html
For this we use the etcd3gw package:
https://pypi.python.org/pypi/etcd3gw
The structure of the code is very similar to the one we
already have that uses the etcd3 package.
Change-Id: I97bd7ffb05a7e40cb08c9b9d62cc45236ad292aa
If requests raises an exception and blocking is True, then there's no watch and
nothing is returned. The problem is that then the reply variable is checked but
it is actually not assigned, so a NameError is raised.
This makes sure False is returned if an error occurs and blocking is True.
Change-Id: I078826a894ee2cb8754259c8db9ea5ae19114910
pifpaf always exports the URL as being etcd:// which always loads the etcd
driver, and never the etcd3 driver. Therefore, it's not currently tested.
This fixes that by exporting a variable in tox that will allow us to replace
the URL correctly.
Change-Id: Id4f54bb1f729498a39e9bf58da8ee01562c4344b
Many drivers leverage concurrent.futures to return result, so let's just
factorize all of that in a same place.
Change-Id: Ibdec36912b553eb4b76c9f99619c171bc41766bb
each lock creates it's own connection and only gets released when
garbage collection kicks in because of limitations
change logic so if we don't have lock, we don't have connection.
Change-Id: Ibf6eaf3ff3031424917e9fdb6920bf2fc1808b7c
This patch adds support to Tooz for taking advantage of the etcd3 gRPC-based
API (instead of the etcd2 HTTP/REST-based API) via the python-etcd3 library.
Change-Id: Ic7c3d9be42a9912fcb09c43e7637270db4011c4a
As the title said this patch just implement the heartbeat api for
FileDriver.
1. You can delivery the parameter 'timeout' via the connect url like
this: file:///tmp/test_coord?timeout=10. Otherwise the default timeout
is 10secs.
2. We can call the function: heartbeat(self) periodic
to make sure the specific member is alive.
3. When you call get_members(), it will compare the last modify time of
the file with current time, if the delta_seconds greater than
the timeout, it will mark the member status is dead and will not return
the member_id.
Change-Id: I8617e17fc1a74e70d7eb5b6f8e12dc9d9a66c755
Closes-Bug: #1664559
current code uses a nested loop which makes additional _get_node
calls needlessly when replicas > 1. this patch replaces it with a
simpler single loop.
Change-Id: I6bb5753ba1cef489648d7d1a75374cbb63ac5656