Skip to content

Commit

Permalink
SUSE: Apply workaround for mariadb-10.2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Markos Chandras authored and cloudnull committed Nov 29, 2017
1 parent e9d7ab1 commit 546c402
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
10 changes: 10 additions & 0 deletions tasks/galera_post_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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" }
Expand Down
5 changes: 5 additions & 0 deletions templates/systemd.environment.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# {{ ansible_managed }}

[Service]
# https://jira.mariadb.org/browse/MDEV-14256
Environment="WSREP_SST_OPT_PORT=4444"
3 changes: 3 additions & 0 deletions tests/test-galera-server-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} \
Expand All @@ -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 }} \
Expand All @@ -42,6 +44,7 @@
--silent \
--skip-column-names
register: wsrep_evs_state
changed_when: false
- name: Check contents
assert:
that:
Expand Down
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ percona_packages_list:
- packages: "{{ [qpress_package_path] }}"
enabled: "{{ not use_percona_upstream }}"
local_pkg: yes

mariadb_delete_etc_conf_files: []
7 changes: 6 additions & 1 deletion vars/suse-42.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 546c402

Please sign in to comment.