diff --git a/.zuul.yaml b/.zuul.yaml index 9122fbac..6d0a53f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -8,8 +8,6 @@ - release-notes-jobs-python3 check: jobs: - - tooz-tox-py38-etcd - - tooz-tox-py310-etcd - tooz-tox-py38-etcd3gw - tooz-tox-py310-etcd3gw - tooz-tox-py38-zookeeper @@ -28,8 +26,6 @@ - tooz-tox-py310-consul gate: jobs: - - tooz-tox-py38-etcd - - tooz-tox-py310-etcd - tooz-tox-py38-etcd3gw - tooz-tox-py310-etcd3gw - tooz-tox-py38-zookeeper @@ -55,14 +51,6 @@ vars: tox_envlist: py38-consul -- job: - name: tooz-tox-py38-etcd - parent: openstack-tox-py38 - description: | - Run tests using ``py38-etcd`` environment. - vars: - tox_envlist: py38-etcd - - job: name: tooz-tox-py38-etcd3gw parent: openstack-tox-py38 @@ -131,14 +119,6 @@ vars: tox_envlist: py310-consul -- job: - name: tooz-tox-py310-etcd - parent: openstack-tox-py310 - description: | - Run tests using ``py310-etcd`` environment. - vars: - tox_envlist: py310-etcd - - job: name: tooz-tox-py310-etcd3gw parent: openstack-tox-py310 diff --git a/releasenotes/notes/etcd-3.4-eee8300c942a1263.yaml b/releasenotes/notes/etcd-3.4-eee8300c942a1263.yaml new file mode 100644 index 00000000..8c9044ec --- /dev/null +++ b/releasenotes/notes/etcd-3.4-eee8300c942a1263.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + This version of tooz defaults to the `v3` endpoint for the `etcd3gw` + backend. The previous behavior can be restored by appending + `?api_version=v3alpha` to the coordination URL. The `v3alpha` and + `v3beta` endpoints have been deprecated by upstream etcd. diff --git a/setup-etcd-env.sh b/setup-etcd-env.sh index cfdbaac5..919aee12 100755 --- a/setup-etcd-env.sh +++ b/setup-etcd-env.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eux if [ -z "$(which etcd)" ]; then - ETCD_VERSION=3.1.3 + ETCD_VERSION=3.3.27 case `uname -s` in Darwin) OS=darwin diff --git a/tooz/drivers/etcd3gw.py b/tooz/drivers/etcd3gw.py index 08f348d0..5d058dee 100644 --- a/tooz/drivers/etcd3gw.py +++ b/tooz/drivers/etcd3gw.py @@ -181,7 +181,7 @@ class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, ================== ======= Name Default ================== ======= - api_version v3alpha + api_version v3 ca_cert None cert_key None cert_cert None @@ -201,7 +201,7 @@ class Etcd3Driver(coordination.CoordinationDriverCachedRunWatchers, DEFAULT_PORT = 2379 #: Default api version if none provided - DEFAULT_API_VERSION = "v3alpha" + DEFAULT_API_VERSION = "v3" GROUP_PREFIX = b"tooz/groups/" diff --git a/tooz/tests/__init__.py b/tooz/tests/__init__.py index b7acfa14..f9050097 100644 --- a/tooz/tests/__init__.py +++ b/tooz/tests/__init__.py @@ -58,7 +58,10 @@ class TestWithCoordinator(testcase.TestCase, metaclass=SkipNotImplementedMeta): if os.getenv("TOOZ_TEST_ETCD3"): self.url = self.url.replace("etcd://", "etcd3://") if os.getenv("TOOZ_TEST_ETCD3GW"): - self.url = self.url.replace("etcd://", "etcd3+http://") + # TODO(jan.gutter): When pifpaf supports etcd 3.4 we should use the + # defaults + self.url = self.url.replace("etcd://", "etcd3+http://") + \ + "?api_version=v3beta" self.useFixture(fixtures.NestedTempfile()) self.group_id = get_random_uuid() self.member_id = get_random_uuid() diff --git a/tooz/tests/drivers/test_etcd3gw.py b/tooz/tests/drivers/test_etcd3gw.py index 3b8a09cf..ea417895 100644 --- a/tooz/tests/drivers/test_etcd3gw.py +++ b/tooz/tests/drivers/test_etcd3gw.py @@ -39,14 +39,14 @@ class TestEtcd3Gw(testcase.TestCase): 'timeout': etcd3gw_driver.Etcd3Driver.DEFAULT_TIMEOUT}, {'coord_url': ('etcd3+https://my_host:666?ca_cert=/my/ca_cert&' 'cert_key=/my/cert_key&cert_cert=/my/cert_cert&' - 'timeout=42&api_version=v3'), + 'timeout=42&api_version=v3alpha'), 'protocol': 'https', 'host': 'my_host', 'port': 666, 'ca_cert': '/my/ca_cert', 'cert_key': '/my/cert_key', 'cert_cert': '/my/cert_cert', - 'api_path': '/v3/', + 'api_path': '/v3alpha/', 'timeout': 42}) @ddt.unpack @mock.patch('etcd3gw.client')