From ff7856258e3e7e0cfe80b17c06e7cd29977ec1a5 Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Wed, 22 Nov 2023 20:49:32 +0100 Subject: [PATCH] Fix octavia's proxysql configuration The patch [1] mentioned below added the jobboard functionality to the octavia role, but unfortunately it incorrectly implemented the functionality of users and rules for proxysql. This patch fixes this bug. [1] https://review.opendev.org/c/openstack/kolla-ansible/+/888588 Closes-Bug: #2044293 Change-Id: I6524fabad19b438113db4affe05f5586db99dff4 --- ansible/roles/octavia/defaults/main.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ansible/roles/octavia/defaults/main.yml b/ansible/roles/octavia/defaults/main.yml index 73b3f2859a..f7f9e61709 100644 --- a/ansible/roles/octavia/defaults/main.yml +++ b/ansible/roles/octavia/defaults/main.yml @@ -86,21 +86,17 @@ octavia_persistence_database_address: "{{ octavia_database_address }}" #################### octavia_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ octavia_database_shard_id }}{% else %}{{ database_user }}{% endif %}" octavia_database_shard_id: "{{ mariadb_default_database_shard_id | int }}" +octavia_persistence_database_shard_root_user: "{% if enable_proxysql | bool %}root_shard_{{ octavia_persistence_database_shard_id }}{% else %}{{ database_user }}{% endif %}" +octavia_persistence_database_shard_id: "{{ octavia_database_shard_id | int }}" octavia_database_shard: users: - user: "{{ octavia_database_user }}" password: "{{ octavia_database_password }}" - rules: - - schema: "{{ octavia_database_name }}" - shard_id: "{{ octavia_database_shard_id }}" - -octavia_persistence_database_shard_root_user: "{{ octavia_database_shard_root_user }}" -octavia_persistence_database_shard_id: "{{ octavia_database_shard_id }}" -octavia_persistence_database_shard: - users: - user: "{{ octavia_persistence_database_user }}" password: "{{ octavia_persistence_database_password }}" rules: + - schema: "{{ octavia_database_name }}" + shard_id: "{{ octavia_database_shard_id }}" - schema: "{{ octavia_persistence_database_name }}" shard_id: "{{ octavia_persistence_database_shard_id }}"