Python 3.8 is no longer part of the tested runtimes for 2024.2[1]
because its EOL is coming soon.
Also replace the deprecated md5 wrapper from oslo.utils.
[1] https://governance.openstack.org/tc/reference/runtimes/2024.2.html
Change-Id: I655bc426213694251a855a54633a10276549c5fe
Python 3.8 support is being removed from master. Also python 3.12 is
now part of tested runtimes and should be tested.
Change-Id: Id06f3410cc30c101a5df5a3cce387a497a4c8d09
The oslo.utils library provides the utility method to compare versions.
Use it instead of directly using packaging library, because oslo.utils
is already required by core tooz logic.
Change-Id: I315de78098d4a7cbe77fffd59ca848caf7d91eb6
The current implementation does not strictly require 23.0.0 and can
work with older versions. Lower down the version to 20.4, which is
the minimum version required by oslo.utils 4.7.0 .
Change-Id: I0fddcea1c65184340244da63d1353eeea39e3370
These are detected as errors since the clean up was done[1] in
the requirements repository.
[1] 314734e938f107cbd5ebcc7af4d9167c11347406
Change-Id: Ib402c15b6dbe5290a626c4b0028cf496293b72e6
We only use it in the redis driver. Switch to using
packaging.version.Version, which is good enough for the redis-py test
suite also [1].
[1] https://github.com/redis/redis-py/blob/07fc339b4a/tests/conftest.py#L199-L208
Change-Id: I42fddfde153c3293099765bf76fe07a5064b3213
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This ensures options for redis connections are replicated to sentinel
clients, so that users can enable SSL or authentication in Redis
sentinel while they also enable these in Redis.
Closes-Bug: #2052372
Change-Id: I78727387cf8287554549ff5a99a80f3317cbd59b
Redis introduced ACL feature in 4.0.0, and this feature is supported by
redis-py since 3.4.0[1]. When ACL is enabled, authentication requires
username in addition to password.
[1] 8df8cd54d1
Closes-Bug: #2052371
Change-Id: I9b53c3a314dcffbe49535799ba6d7a1fdddb8d84
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg
Change-Id: I5bb0f49c5f5e72cdd121a18d7bffa3a1013c570f
etcd changed API version from v3beta to v3alpha, then v3, and because
of transition available api versions are different according to
the etcd server available.
This change implements the mechanism to detect the current api version
according to the etcd version obtained via the version API. So that
the url without api version works regardless of the etcd server used.
Closes-Bug: #2043810
Depends-on: https://review.opendev.org/c/openstack/etcd3gw/+/901244
Change-Id: Ib81390eb73feafe08d007db1ced4d0ceb3bde212
This driver was deprecated in the 2.11.0 release[1]. The 3.2.0 release
which contains this deprecation is used in upper-constraints of
stable/2023.1 so we are ready to remove this feature now.
[1] 7ee2780af87a013c83fb5a8a5d0c7ab0767b3db8
Change-Id: I5ca2fe43cb25b4687ace6bd21a866b74f289d628
Within 2023.2 python version 3.9 and 3.10 are the
supported python runtimes [1].
[1] https: //review.opendev.org/c/openstack/governance/+/872232
Change-Id: I73a909411d4896adf1fe5903afa1dec4640f8a0b
Zookeeper does support TLS encryption and authentication for client
connections. There's no reason not to pass these arguments to the kazoo
to allow encrypted connections.
We bump minimum kazoo version to 2.6.0 since change implementin SSL support
has been merged with [1] and was first released with 2.6.0 tag.
[1] 35ce10669a
Change-Id: Ied29512989f477a19753afcb789e5588877fd688
tooz doesn't use upper-constraints so we get the newest version of all
dependencies. It seems one of these, etcd3, is incompatible with recent
versions of protobuf.
Failed to import test module: tooz.tests.drivers.test_etcd3
Traceback (most recent call last):
File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/home/zuul/src/opendev.org/openstack/tooz/tooz/tests/drivers/test_etcd3.py", line 22, in <module>
import tooz.drivers.etcd3 as etcd3_driver
File "/home/zuul/src/opendev.org/openstack/tooz/tooz/drivers/etcd3.py", line 18, in <module>
import etcd3
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/__init__.py", line 3, in <module>
import etcd3.etcdrpc as etcdrpc
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/__init__.py", line 1, in <module>
from .rpc_pb2 import *
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/rpc_pb2.py", line 16, in <module>
from etcd3.etcdrpc import kv_pb2 as kv__pb2
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/etcd3/etcdrpc/kv_pb2.py", line 36, in <module>
type=None),
File "/home/zuul/src/opendev.org/openstack/tooz/.tox/py37/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
The etcd3 dependency is only used for the etcd3 driver which was
deprecated in change Iff0cd3b51cfc45ecbddc831c55267e80e9c79cac. The
protobuf dependency is only used for etcd3. We can't outright remove the
etcd3 driver yet as it hasn't been long enough since we deprecated it.
That will happen soon enough though and until then we can simply cap
protobuf to an older version that is compatible with the most recent
etcd3 release.
While we're here, we also sync the lower boundaries in the docs
requirments and add some comments indicating where they come from/what
they're for.
Change-Id: I8d6647118be22b0ce55e01b7e5451612ebe30e73
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum,
example nova:
- 56b5aed08c/setup.cfg (L13)
Also indicates that we support python 3.9.
Change-Id: I9f9e63fcea02a90a08bfb381755ed76cdd35ddef
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: I4b4bace2f08ce960a789fb97cf7320fc07195526
etcd3gw 0.2.6 was blacklisted in openstack/requirements [0], because
that version has a bug [1].
tooz does not use openstack/requirements' upper constraints, so the
same blacklisting needs to be introduced here in setup.cfg.
[0] Icb6873d8c5d3a3624c0ac3d76fc9125c5d8134b2
[1] https://github.com/dims/etcd3-gateway/issues/41
Change-Id: I22b955419014dd34c63e406c488e0636ffe9013b
Closes-Bug: #1891314
When running Consul with ACLs enabled, the best practice is to
default deny all. In order to support applying a policy to the
tooz coordination KV store path, passing through an ACL is needed.
Closes-Bug: #1752205
Change-Id: I98fc96468b21368ce66365e3fc38c495b1f2918a
The etcd3 and etcd3gw drivers parse CA, key and cert options from
the coordination URL, and pass them on to the backend clients. The
etcd3gw driver implements the "etcd3+https" scheme.
Change-Id: I78d8ca0583f883f7f746791f82fbcc116458ce2c
Sphinx 2.0 no longer works on python 2.7, so we need to start capping it there.
grpcio-1.16.0 introduced a bug that is breaking the tooz unit tests.
cf. I8b026a0680a91a68281e354a59012565f4db1b95 for more info. 1.18.0
fixes the problem, so bump our minimum requirement to that version.
Change-Id: I4b672563f4a80ce0e0478c867b7f85842ac3b0d3
After n heartbeats, the expireation time of the lock key becomes
(1 + 0.5n) * timeout! Therefore, when the lock holder performs a
long task and exits abnormally, the lock will not be automatically
released in time.
Change-Id: I2437071bb575e95083b0d57a6a0a33aaf8356113
We no longer test with Python 3.5 and we shouldn't claim we somehow
support it. We do support Python 3.7 now though so mark that as such.
Change-Id: If4b3cc1be30e5d47cc7db9197be81d6790891ff2
- 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
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
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
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
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: I10fbc4cb80d53d4bf5b8b6365c7472b7706d46b2
This makes sure we install the correct and only the correct dependencies
when installing tooz, based on the driver one wants to use.
Change-Id: I58825cf228771a00b28d515a552141b42f884efa