From e17640cb87a49b22f380e73e79c6ff24604a72fb Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Wed, 29 May 2024 14:18:40 +0000 Subject: [PATCH] Wait for DB writes to propagate (causality checks) Fix some inconsistencies in multi-master mode (based on https://github.com/openstack-k8s-operators/cinder-operator/pull/392) Jira: OSPRH-7369 --- templates/octavia/config/octavia.conf | 4 ++++ templates/octaviaamphoracontroller/config/octavia.conf | 4 ++++ templates/octaviaapi/config/octavia.conf | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/templates/octavia/config/octavia.conf b/templates/octavia/config/octavia.conf index 1a3b6df5..b5b15f62 100644 --- a/templates/octavia/config/octavia.conf +++ b/templates/octavia/config/octavia.conf @@ -12,6 +12,10 @@ default_listener_tls_versions=TLSv1.2,TLSv1.3 default_pool_tls_versions=TLSv1.2,TLSv1.3 [database] connection = {{ .DatabaseConnection }} +# Wait for writes to complete when doing a read, update, or insert +# Relevant for multi-master deployments so that workers table works as intended +# https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/ +mysql_wsrep_sync_wait = 7 [health_manager] health_update_threads=4 stats_update_threads=4 diff --git a/templates/octaviaamphoracontroller/config/octavia.conf b/templates/octaviaamphoracontroller/config/octavia.conf index a38e95c0..d9465d35 100644 --- a/templates/octaviaamphoracontroller/config/octavia.conf +++ b/templates/octaviaamphoracontroller/config/octavia.conf @@ -8,6 +8,10 @@ graceful_shutdown_timeout=600 [api_settings] [database] connection = {{ .DatabaseConnection }} +# Wait for writes to complete when doing a read, update, or insert +# Relevant for multi-master deployments so that workers table works as intended +# https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/ +mysql_wsrep_sync_wait = 7 [health_manager] heartbeat_key={{ .HeartbeatKey }} health_update_threads=4 diff --git a/templates/octaviaapi/config/octavia.conf b/templates/octaviaapi/config/octavia.conf index 5906565a..009a1e05 100644 --- a/templates/octaviaapi/config/octavia.conf +++ b/templates/octaviaapi/config/octavia.conf @@ -12,6 +12,10 @@ default_listener_tls_versions=TLSv1.2,TLSv1.3 default_pool_tls_versions=TLSv1.2,TLSv1.3 [database] connection = {{ .DatabaseConnection }} +# Wait for writes to complete when doing a read, update, or insert +# Relevant for multi-master deployments so that workers table works as intended +# https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/ +mysql_wsrep_sync_wait = 7 [health_manager] health_update_threads=4 stats_update_threads=4