51 Commits

Author SHA1 Message Date
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
Vilobh Meshram
f917844ee5 Add a consul based driver
For now it only supports locks, in the
future it may support more functionality
as time allows (and/or if people want to
add it).

Co-Authored-By: Joshua Harlow <harlowja@gmail.com>

Implements: bp add-consul-driver

Change-Id: I6064383e9db4e90fd16f17065bd7b0934ca7e125
2016-05-12 08:23:49 +00:00
Julien Danjou
d2529173ec etcd: driver with lock support
Change-Id: Ibac90b9b2a751eb4f502e2f8b723e5608dcaad18
2015-12-29 10:02:05 +01:00
Davanum Srinivas
5cc62c2f25 docs - Set pbr 'warnerrors' option for doc build
By setting this pbr option in setup.cfg, the doc build will fail in case
of any warnings or errors occur during the build process.

Change-Id: Ia6b9cef8933ade60810a48d1813a6f3b3dc72103
2015-09-24 21:46:09 -04:00
Joshua Harlow
1731f8eb18 Remove 2.6 classifier
Depends-On: I02e3c9aacef0b295a2f823a5cbaf11768a90cb82

Change-Id: Iaf0c38345735f90ba3a81439c9819fd6ee282951
2015-06-18 15:51:19 -07:00
Vilobh Meshram
9d8b146d71 Add zookeeper tag in setup.cfg
Add zookeeper tag in setup.cfg to enable loading the
Zookeeper driver.

Change-Id: Ia5c1bbd75a93c3ebb86ac8ece88ebc69e006440c
2015-05-03 18:01:41 -07:00
Joshua Harlow
eb95e7f8f3 Remove support for 3.3
We don't test against 3.3 in the integrated CI anymore
so we likely shouldn't say that we support it anymore
since it's not something we are guaranteeing.

We still support 3.4 (and that's what we are testing
against so we use that version in the setup.cfg
file).

Change-Id: I9fadcac92ea3f43e811818cf013f93445ec1b5e9
2015-03-09 11:26:44 -07:00
Julien Danjou
405dfec672 Add a file based driver
Change-Id: Ie299a8a27045526c27907cdf97b8a240325d908c
2015-01-16 10:31:13 +01:00
Julien Danjou
8deae0f9f7 Add MySQL driver
Change-Id: Ia10be91f8985d4e2159437ad94096a690ee84dc3
2014-11-17 11:09:23 +01:00
Julien Danjou
b5f87e4fc5 Add a PostgreSQL driver
Change-Id: Id6a6ef4c1ec11c1f8cf5aa440c4f425213837ffc
2014-11-06 12:16:41 +01:00
Joshua Harlow
93edb3d992 Add a redis driver
Add the foundations of a redis driver that can be used
along side the rest of the driver types.

Redis provides a few nice benefits that act as a poormans
zookeeper.

- Durability (when setup with AOF mode).
- Consistent, note that this is still restricted to only
  one redis server, without the recently released redis (alpha)
  clustering > 1 server will not be consistent when partitions
  or failures occur (even redis clustering docs state it is
  not a fully AP or CP solution, which means even with it there
  will still be *potential* inconsistencies).
- Master/slave failover (when setup with redis sentinel), giving
  some notion of HA (values *can* be lost when a failover transition
  occurs).

Further resources/links:

- http://redis.io/
- http://redis.io/topics/sentinel
- http://redis.io/topics/cluster-spec

Change-Id: I2d90be1afae98f40ff5c4230563e686b23d42c8f
2014-10-15 10:50:09 -07:00
Julien Danjou
13c23cffa0 Add home-page field
Change-Id: I57e55ab268158e5c36c525b716d225edfacd0863
Signed-off-by: Julien Danjou <julien@danjou.info>
2014-10-06 11:45:45 +02:00
Dina Belova
faaeb41721 Move Zake driver code to separated Python module
That is needed to prevent Zake driver load in real-life Zookeeper
usage - currently we had the situation when even if you want to use
just KaZoo, you needed to install partially test-requierements
(zake package).

Change-Id: I9664fda2d6e76a6e48776b4a6d92af4c4baf1425
2014-09-05 11:13:03 -07:00
Julien Danjou
f3e11e40f9 coordination: add IPC driver
For now it only supports locking.

Change-Id: Iccbc1da162e70d0186131adc0ac9cfeb20f7a647
2014-08-04 15:03:06 +02:00
Julien Danjou
fc85db067a Add documentation
Change-Id: Ib236d2061f5f375f7314993db7e6fc38d0f8750b
2014-07-18 15:08:14 +02:00
Julien Danjou
214fbd6128 Add memcached driver
Change-Id: Ia537335d3ff1386e0d04129016fb97b5e01c5b79
Co-Author: Sahid Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
2014-03-21 11:51:50 +01:00
Yassine Lamgarchal
b693c3f677 Add a fake ZooKeeper driver
This patch add a new driver which mimic a Kazoo client
without the need to use a real zookeeper server.

The dependency Zake (written by Joshua Harlow:harlowja@gmail.com)
has been added which provides the Kazoo API.

Change-Id: I53ca9ac972d6e2dca2f9e04b6187ee0545813e74
2014-01-14 11:09:10 +01:00