67 Commits

Author SHA1 Message Date
Takashi Kajinami
de0a78f908 Remove Python 3.8 support
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
2024-10-16 11:54:53 +09:00
Zuul
27b0679861 Merge "Use oslo.utils implementation to compare versions" 2024-10-05 13:22:40 +00:00
Takashi Kajinami
67ebf552b0 Bump python versions used in tests
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
2024-10-02 02:16:15 +00:00
Takashi Kajinami
46366e0d25 Use oslo.utils implementation to compare versions
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
2024-10-01 18:14:50 +00:00
Takashi Kajinami
1a6af8b93c Loose lower bound of packaging library version
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
2024-05-10 12:51:32 +00:00
Takashi Kajinami
c38b9440e6 Remove old excludes
These are detected as errors since the clean up was done[1] in
the requirements repository.

[1] 314734e938f107cbd5ebcc7af4d9167c11347406

Change-Id: Ib402c15b6dbe5290a626c4b0028cf496293b72e6
2024-04-30 18:10:35 +09:00
Stephen Finucane
f94fd2c1ae Remove use of distutils
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>
2024-03-28 10:15:43 +00:00
Takashi Kajinami
4954e284b9 Redis: Fix missing ssl/auth options for sentinel
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
2024-02-04 19:31:35 +09:00
Takashi Kajinami
a267b2811b redis: Add username
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
2024-02-04 08:11:23 +00:00
Ghanshyam Mann
ed04dbeeab Update python classifier in setup.cfg
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
2024-01-11 16:36:58 -08:00
Zuul
ef898ba118 Merge "etcd3gw: Discover API version automatically" 2023-12-19 18:56:07 +00:00
Takashi Kajinami
f180411f42 etcd3gw: Discover API version automatically
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
2023-12-15 09:51:40 +09:00
Takashi Kajinami
6bc02cda5b Remove etcd3 drvier
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
2023-11-17 23:34:26 +09:00
Ghanshyam
67bc01af4f Revert "Moves supported python runtimes from version 3.8 to 3.10"
This reverts commit 4a18ae10b8d2dc164b4607fcd0728bb24516a723.

Keeping Python 3.10 in setup.cfg classifier and testing py38 min and
py310 max version.

Reason for revert:

Needed-By: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175

TC has been discussing about re-adding the python 3.8
testing in current master 2023.2 release testing.

- https://meetings.opendev.org/meetings/tc/2023/tc.2023-04-25-18.00.log.html#l-191
- https://lists.openstack.org/pipermail/openstack-discuss/2023-April/033469.html

While governance changes are under review, TC agreed to add py3.8 testing
so that we do not see more project/lib dropping python 3.8 and make them
uninstalable on python 3.8

- https://meetings.opendev.org/meetings/tc/2023/tc.2023-05-02-18.00.log.html#l-17
- https://review.opendev.org/c/openstack/governance/+/882165

Also adding py3.8 testing back in job https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175

Change-Id: I18508891947649aa0a696372f71877c87b5c387e
2023-05-05 14:03:32 -05:00
Takashi Kajinami
4a18ae10b8 Moves supported python runtimes from version 3.8 to 3.10
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
2023-04-10 13:13:32 +09:00
Dmitriy Rabotyagov
f11666b66c Allow to pass ssl-related args for zookeeper
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
2022-12-08 19:54:11 +00:00
Stephen Finucane
e3de0e634a Cap protobuf < 4.x
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>
2022-06-28 15:11:35 +01:00
Hervé Beraud
b21c20f79f Drop python3.6/3.7 support in testing runtime
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
2022-05-05 16:01:30 +02:00
yangyawei
0e0c11eef3 setup.cfg: Replace dashes with underscores
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
2021-05-14 13:50:15 +08:00
Elod Illes
3f0759091c Blacklist etcd3gw 0.2.6
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
2020-09-29 18:46:25 +02:00
Hervé Beraud
5d60388fd2 Add python 3.8 to classifiers
Change-Id: Ife3021fe203fdb6a9a6f2f51d45a64773f5fe89c
2020-05-26 14:06:45 +02:00
JP Bourget
08b2d93226 Add support for Consul ACL token parameter.
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
2020-05-14 21:48:49 -04:00
Zuul
1880be2c00 Merge "Add TLS support in etcd3 and etcd3gw drivers" 2020-04-01 18:27:03 +00:00
Alan Bishop
a598cce62b Add TLS support in etcd3 and etcd3gw drivers
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
2020-04-01 06:56:51 -07:00
Zuul
27c4f158e5 Merge "Avoid redis lock's expire_time exceeding timeout." 2020-03-02 11:26:47 +00:00
Andreas Jaeger
ba27954b06 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Parent tox py36/py37 jobs to openstack-tox-py36/37 so that the correct
interpreter is installed.

Change-Id: I14a01f0a9989195e30c3ed0dadec35490f41bd48
2020-02-03 22:19:47 +01:00
Thomas Bechtold
535121d613 Move grpcio from requirements.txt to extras
It is only needed for the etcd3 driver.

Change-Id: I0a0215f56b37d9a4286097b7f748f68d59afcb35
2019-07-04 08:23:54 +02:00
Hervé Beraud
ef5277d75c Move test deps to test-requirements.txt
Change-Id: I17554c184d028c142e9415c4a85d9a57d8177b77
2019-06-05 23:55:27 +02:00
Hervé Beraud
8793340916 Remove unused requirements.
Requirements like tests and docs are not longer managed by setup.cfg.

Change-Id: I299601b80676f0e359713210bfc5cc8f2261eba4
2019-06-04 09:24:49 +02:00
Hervé Beraud
89b61cddb2 Update Sphinx requirement and uncap grpcio
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
2019-06-04 09:24:49 +02:00
garenchan
20bda6ed99 Avoid redis lock's expire_time exceeding timeout.
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
2019-06-01 01:19:03 +00:00
Ghanshyam Mann
d47b1a7ede Remove py35, add py37 classifiers
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
2019-05-21 09:32:22 +01:00
malei
4c753f2ccd Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: I136c931dce4927c500e29205b8cddf04533f8d83
2018-12-04 18:08:28 +08:00
Ben Nemec
bd7cc62a73 Migrate to stestr
Change-Id: Id717f076d13f10697a7528139950a0b70d95c1c3
2018-09-18 00:37:30 +00:00
Sean McGinnis
f36f0fcdb7 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I328db3d0048386ddd2c4f785de542aeb7b98c6e1
2018-01-08 12:21:46 -06:00
ChangBo Guo(gcb)
c2167820c8 Update URLs in documents according to document migration
Change-Id: I579b62a46f484e0129f88b12d1e16018cc9c7684
2017-07-13 12:09:43 +08:00
Akihiro Motoki
38bcf7bbdb Switch from oslosphinx to openstackdocstheme
Change-Id: Id5e2952676e89f768e13b4ffc2f238eb012ec324
2017-07-07 02:54:25 +00:00
Akihiro Motoki
cf12457896 Turn on warning-is-error in doc build
- 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
2017-07-07 02:52:30 +00:00
Julien Danjou
c94b2a39b3 etcd3: replace custom lock code by more recent etcd3 lock code
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
2017-06-23 17:41:26 +02:00
Davanum Srinivas
6ec73a0bed Separate etcd3gw driver that uses the etcd3 grpc gateway
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
2017-05-22 14:33:44 +02:00
Jay Pipes
9ba92a88d0 etcd3: add etcd3 coordination driver
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
2017-04-17 11:47:15 -04:00
Cao Xuan Hoang
3993d11782 Changed author and author-email
Changed author to OpenStack and author-email to
openstack-dev@lists.openstack.org

Change-Id: I672fc6223b1d95997ffd782d67f5ff3b87a8c159
2016-11-28 10:05:45 +07:00
Julien Danjou
09d5b3d45e tox: use pretty tox output
Change-Id: Ib8738de03820f94b9e68681631034b7847c39fbb
2016-11-14 21:38:00 +01:00
Julien Danjou
4e46ae1a5d tox: install docs dependency in docs target and reno
Otherwise, it does not work.

Change-Id: I6b3dd5752abdecd5ba9ec3acf7b122e5a40898d3
2016-11-10 10:34:29 +01:00
ChangBo Guo(gcb)
bfbee9fc9f Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Closes-Bug: #1634356

Change-Id: I10fbc4cb80d53d4bf5b8b6365c7472b7706d46b2
2016-11-03 15:09:51 +08:00
melissaml
4d48760302 Changed the home-page link
Set the correct link for home-page.

Change-Id: I76dddaf34aad718be0ee18a2b7d73734e96cca18
2016-10-17 00:33:48 +08:00
Julien Danjou
4f177580fe etcd: run tests in clustering mode too
Depends-On: Icbf997be2afb6e4f2cb8e142024dce21fe12a04b
Change-Id: Ibcb315ccde165ef3a5f7ba6900336059b436d75c
2016-09-25 12:43:41 +02:00
Julien Danjou
65d8c09148 Switch from Python 3.4 to Python 3.5
Change-Id: Iacf2a84d775ded1d67bf540ad0afc4bcf2066f14
2016-09-22 16:59:19 +02:00
OpenStack Proposal Bot
7ea400af6b Updated from global requirements
Change-Id: I2ef5d50d8a3ddce8d2f1ac3e8b2459c999205ee4
2016-06-21 18:07:05 +00:00
Julien Danjou
e8d37b018a Change dependency to use flavors
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
2016-06-09 10:40:48 +02:00