Skip to content

Commit

Permalink
Revert "Wait for DB writes to propagate (causality checks)"
Browse files Browse the repository at this point in the history
This reverts commit ab95f15.

The openstack-k8s-operators/mariadb-operator#229
switched the mariadb-operator to Active/Passive mode instead of
multimaster. This means we don't need to force synchronization from the
client config any more.
  • Loading branch information
gibizer authored and openshift-merge-bot[bot] committed Jun 17, 2024
1 parent c7395c1 commit 0360b9c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
10 changes: 0 additions & 10 deletions templates/nova.conf
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,12 @@ cpu_power_management=true
{{if (index . "cell_db_address")}}
[database]
connection = mysql+pymysql://{{ .cell_db_user }}:{{ .cell_db_password}}@{{ .cell_db_address }}/{{ .cell_db_name }}?read_default_file=/etc/my.cnf

# Wait for writes to complete when doing a read.
# Relevant for multi-master galera deployments
# https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/
mysql_wsrep_sync_wait = 1
{{end}}


{{if (index . "api_db_address")}}
[api_database]
connection = mysql+pymysql://{{ .api_db_user }}:{{ .api_db_password }}@{{ .api_db_address }}/{{ .api_db_name }}?read_default_file=/etc/my.cnf

# Wait for writes to complete when doing a read.
# Relevant for multi-master galera deployments
# https://mariadb.com/docs/server/ref/mdb/system-variables/wsrep_sync_wait/
mysql_wsrep_sync_wait = 1
{{end}}

[keystone_authtoken]
Expand Down
4 changes: 1 addition & 3 deletions test/functional/nova_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,14 @@ var _ = Describe("Nova controller", func() {
cell0Account.Spec.UserName, cell0Secret.Data[mariadbv1.DatabasePasswordSelector],
novaNames.Namespace)),
)

apiAccount := mariadb.GetMariaDBAccount(novaNames.APIMariaDBDatabaseAccount)
apiSecret := th.GetSecret(types.NamespacedName{Name: apiAccount.Spec.Secret, Namespace: novaNames.APIMariaDBDatabaseAccount.Namespace})

Expect(configData).To(
ContainSubstring(fmt.Sprintf("[api_database]\nconnection = mysql+pymysql://%s:%s@hostname-for-openstack.%s.svc/nova_api?read_default_file=/etc/my.cnf",
apiAccount.Spec.UserName, apiSecret.Data[mariadbv1.DatabasePasswordSelector], novaNames.Namespace)),
)

Expect(configData).To(ContainSubstring("mysql_wsrep_sync_wait = 1"))

// NOTE(gibi): cell mapping for cell0 should not have transport_url
// configured. As the nova-manage command used to create the mapping
// uses the transport_url from the nova.conf provided to the job
Expand Down

0 comments on commit 0360b9c

Please sign in to comment.