From a0ca41cda58d6e2fc16c82b15beb383c3525e5b3 Mon Sep 17 00:00:00 2001
From: Hongbin Lu <hongbin034@gmail.com>
Date: Thu, 21 Dec 2023 07:35:48 +0000
Subject: [PATCH] Zun: remove docker's cluster-store option

* Remove docker's cluster-store option. This option was removed from
  the latest version of docker so we removed it.
* Switch kuryr's capability_scope from "global" to "local". The "global"
  scope relies on a cluster store but docker no longer supports it.

Change-Id: Ie62396184552938d099223f9d325a41c9a5067c3
---
 ansible/group_vars/all.yml                      | 3 +--
 ansible/roles/kuryr/templates/kuryr.conf.j2     | 2 +-
 doc/source/reference/containers/kuryr-guide.rst | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 6a6c099dcc..0ef1806e8c 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -130,8 +130,7 @@ docker_restart_policy_retry: "10"
 # Extra docker options for Zun
 docker_configure_for_zun: "no"
 docker_zun_options: -H tcp://{{ api_interface_address | put_address_in_context('url') }}:2375
-docker_zun_config:
-  cluster-store: etcd://{% for host in groups.get('etcd', []) %}{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{{ hostvars[host]['etcd_client_port'] }}{% if not loop.last %},{% endif %}{% endfor %}
+docker_zun_config: {}
 
 # Extra containerd options for Zun
 containerd_configure_for_zun: "no"
diff --git a/ansible/roles/kuryr/templates/kuryr.conf.j2 b/ansible/roles/kuryr/templates/kuryr.conf.j2
index c399740c07..2db4ae9579 100644
--- a/ansible/roles/kuryr/templates/kuryr.conf.j2
+++ b/ansible/roles/kuryr/templates/kuryr.conf.j2
@@ -3,7 +3,7 @@ kuryr_uri = {{ kuryr_internal_endpoint }}
 debug = {{ kuryr_logging_debug }}
 log_dir = /var/log/kolla/kuryr
 
-capability_scope = global
+capability_scope = local
 bindir = /var/lib/kolla/venv/libexec/kuryr
 
 [binding]
diff --git a/doc/source/reference/containers/kuryr-guide.rst b/doc/source/reference/containers/kuryr-guide.rst
index 68532e9120..fbcbfd4192 100644
--- a/doc/source/reference/containers/kuryr-guide.rst
+++ b/doc/source/reference/containers/kuryr-guide.rst
@@ -20,7 +20,7 @@ To allow Docker daemon connect to the etcd, add the following in the
 
 .. code-block:: ini
 
-   ExecStart= -H tcp://172.16.1.13:2375 -H unix:///var/run/docker.sock --cluster-store=etcd://172.16.1.13:2379 --cluster-advertise=172.16.1.13:2375
+   ExecStart= -H tcp://172.16.1.13:2375 -H unix:///var/run/docker.sock --cluster-advertise=172.16.1.13:2375
 
 The IP address is host running the etcd service. ```2375``` is port that
 allows Docker daemon to be accessed remotely. ```2379``` is the etcd listening