Skip to content

Commit 1a1fb86

Browse files
mnasiadkayoctozepto
authored andcommitted
mariadb: Do not use wsrep-notify.sh on Debian
Closes-Bug: #1947534 Change-Id: I08be074c3633cc4fb0a0bc6c9cb8d03eb5226d89 (cherry picked from commit b6b7401)
1 parent bc114af commit 1a1fb86

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

ansible/roles/mariadb/defaults/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mariadb_services:
2121
backend_tcp_extra:
2222
- "option srvtcpka"
2323
- "timeout server 3600s"
24-
- "option {% if enable_mariadb_clustercheck | bool %}httpchk{% else %}mysql-check user haproxy post-41{% endif %}"
24+
- "{% if enable_mariadb_clustercheck | bool %}option httpchk{% else %}{% if kolla_base_distro != 'debian' %}option mysql-check user haproxy post-41{% endif %}{% endif %}"
2525
custom_member_list: "{{ internal_haproxy_members.split(';') }}"
2626
mariadb_external_lb:
2727
enabled: "{{ enable_external_mariadb_load_balancer|bool }}"
@@ -57,8 +57,8 @@ database_max_timeout: 120
5757
####################
5858
# HAProxy
5959
####################
60-
internal_haproxy_members: "{% for host in mariadb_default_database_shard_hosts %} server {{ hostvars[host].ansible_facts.hostname }} {{ 'api' | kolla_address(host) }}:{{ mariadb_port }} check {% if enable_mariadb_clustercheck | bool %}port {{ mariadb_clustercheck_port }}{% endif %} inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
61-
external_haproxy_members: "{% for host in mariadb_default_database_shard_hosts %} server {{ host }} {{ host }}:{{ mariadb_port }} check {% if enable_mariadb_clustercheck | bool %}port {{ mariadb_clustercheck_port }}{% endif %} inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
60+
internal_haproxy_members: "{% for host in mariadb_default_database_shard_hosts %} server {{ hostvars[host].ansible_facts.hostname }} {{ 'api' | kolla_address(host) }}:{{ mariadb_port }} check {% if enable_mariadb_clustercheck | bool %}port {{ mariadb_clustercheck_port }}{% else %}{% if kolla_base_distro == 'debian' %}port {{ mariadb_port }}{% endif %}{% endif %} inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
61+
external_haproxy_members: "{% for host in mariadb_default_database_shard_hosts %} server {{ host }} {{ host }}:{{ mariadb_port }} check {% if enable_mariadb_clustercheck | bool %}port {{ mariadb_clustercheck_port }}{% else %}{% if kolla_base_distro == 'debian' %}port {{ mariadb_port }}{% endif %}{% endif %} inter 2000 rise 2 fall 5{% if not loop.first %} backup{% endif %};{% endfor %}"
6262

6363
####################
6464
# Docker

ansible/roles/mariadb/tasks/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
- inventory_hostname in groups[item.value.group]
9999
- item.value.enabled | bool
100100
- not enable_mariadb_clustercheck | bool
101+
- kolla_base_distro != 'debian'
101102
with_dict: "{{ mariadb_services }}"
102103
notify:
103104
- restart mariadb

ansible/roles/mariadb/templates/galera.cnf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ wsrep_node_name={{ ansible_facts.hostname }}
4040
wsrep_sst_method={{ sst_method }}
4141
wsrep_sst_auth={{ database_user }}:{{ database_password }}
4242
wsrep_slave_threads=4
43-
{% if not enable_mariadb_clustercheck | bool %}
43+
{% if not enable_mariadb_clustercheck | bool and kolla_base_distro != 'debian' %}
4444
wsrep_notify_cmd=/usr/local/bin/wsrep-notify.sh
4545
{% endif %}
4646
wsrep_on = ON

ansible/roles/mariadb/templates/mariadb.json.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dest": "/etc/{{ mysql_dir }}/my.cnf",
88
"owner": "mysql",
99
"perm": "0600"
10-
}{% if not enable_mariadb_clustercheck | bool %},
10+
}{% if not enable_mariadb_clustercheck | bool and kolla_base_distro != 'debian' %},
11+
}
1112
{
1213
"source": "{{ container_config_directory }}/wsrep-notify.sh",
1314
"dest": "/usr/local/bin/wsrep-notify.sh",
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue on Debian with single node MariaDB deployments with
5+
HAProxy disabled.
6+
See `bug 1947534 <https://launchpad.net/bugs/1947534>`__ for details.

0 commit comments

Comments
 (0)