From 12eeccdd91f543dee722f46d3eee6bdf84e543b7 Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Wed, 18 Sep 2024 22:28:27 +0200 Subject: [PATCH] Fix IPv6 address format in ProxySQL configuration This patch resolves an issue where ProxySQL could not bind due to incorrectly formatted IPv6 addresses in the `mysql_ifaces` configuration. The kolla's `put_address_in_context` filter is now used, ensuring the addresses are properly enclosed in square brackets for correct binding. Closes-Bug: #2081106 Change-Id: Ic166b8d9a500023c8d23ec9fee03b28b268b26e7 --- .../roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 | 4 ++-- releasenotes/notes/bug-2081106-ef0df790780c612d.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-2081106-ef0df790780c612d.yaml diff --git a/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 b/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 index 1f8550d4f0..e752007068 100644 --- a/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 +++ b/ansible/roles/loadbalancer/templates/proxysql/proxysql.yaml.j2 @@ -10,7 +10,7 @@ errorlog: "/var/log/kolla/proxysql/proxysql.log" admin_variables: admin_credentials: "{{ proxysql_admin_user }}:{{ proxysql_admin_password }}" - mysql_ifaces: "{{ api_interface_address }}:{{ proxysql_admin_port }};{{ kolla_internal_vip_address }}:{{ proxysql_admin_port }};/var/lib/kolla/proxysql/admin.sock" + mysql_ifaces: "{{ api_interface_address | put_address_in_context('url') }}:{{ proxysql_admin_port }};{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ proxysql_admin_port }};/var/lib/kolla/proxysql/admin.sock" stats_credentials: "{{ proxysql_stats_user }}:{{ proxysql_stats_password }}" restapi_enabled: "{{ enable_prometheus_proxysql_exporter | bool }}" restapi_port: "{{ proxysql_prometheus_exporter_port }}" @@ -19,7 +19,7 @@ admin_variables: mysql_variables: threads: {{ proxysql_workers }} max_connections: {{ proxysql_max_connections }} - interfaces: "{{ kolla_internal_vip_address }}:{{ database_port }}" + interfaces: "{{ kolla_internal_vip_address | put_address_in_context('url') }}:{{ database_port }}" monitor_username: "{{ mariadb_monitor_user }}" monitor_password: "{{ mariadb_monitor_password }}" diff --git a/releasenotes/notes/bug-2081106-ef0df790780c612d.yaml b/releasenotes/notes/bug-2081106-ef0df790780c612d.yaml new file mode 100644 index 0000000000..2d618f0b76 --- /dev/null +++ b/releasenotes/notes/bug-2081106-ef0df790780c612d.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fix ProxySQL unable to bind due to incorrect format + of IPv6 addresses in the `mysql_ifaces` configuration. + `LP#2081106 `__