SUSE: Apply workaround for mariadb-10.2

The openSUSE repository bumped the mariadb package to 10.2. However,
there is an upstream bug that prevents nodes from joining the cluster.
The way to workaround it is to export WSREP_SST_OPT_PORT=4444 in the
systemd service file. Moreover, we pull the mariadb-galera subpackage
which contains some necessary tools for galera clusters. Finally,
we drop the default configuration files which are being installed by
the packages because they conflict with the ones installed by this role.

[hwoarang: This also applies the linter fixes from
https://review.openstack.org/#/c/523080/ in order to make the
gates happy]

Depends-On: Ia4856f36b2d106d987e3c774f31493e25a23d4b5
Link: https://jira.mariadb.org/browse/MDEV-14256
Change-Id: I97cf1585b2fed08f53f62a547547e422bc34fa53
This commit is contained in:
Markos Chandras 2017-11-28 14:51:30 +00:00 committed by Kevin Carter (cloudnull)
parent e9d7ab177e
commit 546c402b5c
5 changed files with 26 additions and 1 deletions

View File

@ -55,6 +55,15 @@
mode: "02755"
when: log_dir.rc == 1
# NOTE: (hwoarang) mariadb packages may drop some default configuration files
# in {{ galera_etc_include_dir }} so make sure they are gone if necessary in
# case they cause some conflicts with the ones we provide.
- name: Remove existing mariadb configuration files
file:
state: absent
path: "{{ galera_etc_include_dir }}/{{ item }}"
with_items: "{{ mariadb_delete_etc_conf_files }}"
- name: Drop mariadb config(s)
config_template:
src: "{{ item.src }}"
@ -127,6 +136,7 @@
dest: "/etc/systemd/system/{{ galera_mariadb_service_name }}.service.d/{{ item.dest }}"
mode: "0644"
with_items:
- { src: "systemd.environment.conf.j2", dest: "environment.conf" }
- { src: "systemd.limits.conf.j2", dest: "limits.conf" }
- { src: "systemd.timeout.conf.j2", dest: "timeout.conf" }
- { src: "systemd.restart.conf.j2", dest: "restart.conf" }

View File

@ -0,0 +1,5 @@
# {{ ansible_managed }}
[Service]
# https://jira.mariadb.org/browse/MDEV-14256
Environment="WSREP_SST_OPT_PORT=4444"

View File

@ -26,6 +26,7 @@
--silent \
--skip-column-names
register: wsrep_incoming_addresses
changed_when: false
- name: Check cluster local state
command: |
mysql -h {{ ansible_host }} \
@ -34,6 +35,7 @@
--silent \
--skip-column-names
register: wsrep_local_state_comment
changed_when: false
- name: Check cluster evs state
command: |
mysql -h {{ ansible_host }} \
@ -42,6 +44,7 @@
--silent \
--skip-column-names
register: wsrep_evs_state
changed_when: false
- name: Check contents
assert:
that:

View File

@ -31,3 +31,5 @@ percona_packages_list:
- packages: "{{ [qpress_package_path] }}"
enabled: "{{ not use_percona_upstream }}"
local_pkg: yes
mariadb_delete_etc_conf_files: []

View File

@ -42,8 +42,8 @@ galera_mariadb_service_name: "mysql"
galera_server_mariadb_distro_packages:
- which
- "{{ galera_mariadb_server_package }}"
- mariadb-galera
- percona-toolkit
- xtrabackup
- rsync
- socat
@ -55,3 +55,8 @@ _use_percona_upstream: yes
# sense for SUSE distributions and as such we provide an empty list here since
# we grab everything from the distro repositories.
percona_packages_list: []
mariadb_delete_etc_conf_files:
- default_plugins.cnf
- galera.cnf
- error_log.cnf