Fix HAProxy check for MariaDB
The MariaDB role HAProxy config section exposes MariaDB on the mariadb_port which may not always be the same as database_port. The HAProxy role checks that the database_port is free, and not the mariadb_port. This could mean that the check passes, but the actual port which HAProxy will attempt to use is taken. This change configures HAProxy to talk to the MariaDB instances on the mariadb_port, and maps them to the database_port which is used by most services as part of the DB connection string. There is a small risk that it may break someones override config. Change-Id: I9507ee709cb21eb743112107770ed3170c61ef74
This commit is contained in:
parent
7fe8cc5a6a
commit
d34147b84b
@ -13,7 +13,8 @@ mariadb_services:
|
|||||||
mariadb:
|
mariadb:
|
||||||
enabled: "{{ enable_mariadb|bool and not enable_external_mariadb_load_balancer|bool }}"
|
enabled: "{{ enable_mariadb|bool and not enable_external_mariadb_load_balancer|bool }}"
|
||||||
mode: "tcp"
|
mode: "tcp"
|
||||||
port: "{{ mariadb_port }}"
|
port: "{{ database_port }}"
|
||||||
|
listen_port: "{{ mariadb_port }}"
|
||||||
frontend_tcp_extra:
|
frontend_tcp_extra:
|
||||||
- "option clitcpka"
|
- "option clitcpka"
|
||||||
- "timeout client 3600s"
|
- "timeout client 3600s"
|
||||||
@ -25,7 +26,8 @@ mariadb_services:
|
|||||||
mariadb_external_lb:
|
mariadb_external_lb:
|
||||||
enabled: "{{ enable_mariadb|bool and enable_external_mariadb_load_balancer|bool }}"
|
enabled: "{{ enable_mariadb|bool and enable_external_mariadb_load_balancer|bool }}"
|
||||||
mode: "tcp"
|
mode: "tcp"
|
||||||
port: "{{ mariadb_port }}"
|
port: "{{ database_port }}"
|
||||||
|
listen_port: "{{ mariadb_port }}"
|
||||||
frontend_tcp_extra:
|
frontend_tcp_extra:
|
||||||
- "option clitcpka"
|
- "option clitcpka"
|
||||||
- "timeout client 3600s"
|
- "timeout client 3600s"
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- MariaDB is now exposed via HAProxy on the ``database_port`` and
|
||||||
|
not the ``mariadb_port``. Out of the box these are both the same,
|
||||||
|
but if you have customised ``mariadb_port`` so that it is different
|
||||||
|
to the ``database_port`` and you have a service talking to it
|
||||||
|
via HAProxy on that port then you should review your configuration.
|
Loading…
Reference in New Issue
Block a user