From cf4f3f6efe8d6f26277df9ffca82cd13869a6aa0 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Thu, 30 May 2024 11:34:00 +0200 Subject: [PATCH] Cinder wait for DB writes on reads Because we deploy the database in multi-master mode we can have cases where a service writes something in the database and when another one reads from the DB that data is not yet there. This is a problem for Cinder, so we need to ensure that reads happen after writes from other nodes are present. The cinder operator already has this [1], but until jobs are using that code we will be adding the configuration option manually. [1]: https://github.com/openstack-k8s-operators/cinder-operator/commit/b0747944394807862e4cdcfa7052f1f8d1febf94 --- lib/control-plane/openstackcontrolplane.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/control-plane/openstackcontrolplane.yaml b/lib/control-plane/openstackcontrolplane.yaml index 7a69d9f09..67a32986a 100644 --- a/lib/control-plane/openstackcontrolplane.yaml +++ b/lib/control-plane/openstackcontrolplane.yaml @@ -30,6 +30,10 @@ spec: # Debug logs by default, jobs can override as needed. [DEFAULT] debug = true + # Necessary to prevent DB race conditions. + # Remove once jobs run b0747944394807862e4cdcfa7052f1f8d1febf94. + [database] + mysql_wsrep_sync_wait = 1 cinderBackup: networkAttachments: - storage