Browse Source

Bump version and use mariabackup

We're currently deploying 10.2.17 which is quite old and we seem
to be having issues in the gate with some database sync's causing
MariaDB to crash, as well as personal experience with similar
crashes around Cinder database syncs

In addition, this change implements the usage of mariabackup for
SST transfers which eliminates the need for the Percona repos.

The compression is no longer recommended by upstream now, therefore,
we remove it.

Change-Id: I59a0e225205be43b5bfc76c4bc3381b6e9c54cfd
Mohammed Naser 1 month ago
parent
commit
94640cd215

+ 5
- 23
defaults/main.yml View File

@@ -40,8 +40,8 @@ galera_debconf_items: []
40 40
 galera_mariadb_server_package: "{{ _galera_mariadb_server_package }}"
41 41
 
42 42
 # The major version used to select the repo URL path
43
-galera_major_version: 10.2
44
-galera_minor_version: 17
43
+galera_major_version: 10.3
44
+galera_minor_version: 13
45 45
 
46 46
 # Set the URL for the MariaDB repository
47 47
 galera_repo_host: "downloads.mariadb.com"
@@ -61,12 +61,6 @@ galera_repo: "{{ _galera_repo }}"
61 61
 #     validate_certs: no
62 62
 galera_gpg_keys: "{{ _galera_gpg_keys | default([]) }}"
63 63
 
64
-# Set the rpo information for the Percona Xtrabackup repository
65
-galera_percona_xtrabackup_repo: "{{ _galera_percona_xtrabackup_repo | default({}) }}"
66
-
67
-# Enable the use of the upstream percona repo
68
-use_percona_upstream: "{{ _use_percona_upstream }}"
69
-
70 64
 galera_monitoring_user: monitoring
71 65
 galera_monitoring_user_password: ""
72 66
 
@@ -125,16 +119,14 @@ galera_wsrep_slave_threads_max: 16
125 119
 galera_wsrep_slave_threads: "{{ [[ansible_processor_vcpus|default(2), 2] | max, galera_wsrep_slave_threads_max] | min }}"
126 120
 galera_wsrep_retry_autocommit: 3
127 121
 galera_wsrep_debug: 0
128
-galera_wsrep_sst_method: xtrabackup-v2
122
+galera_wsrep_sst_method: mariabackup
129 123
 galera_wsrep_provider_options:
130 124
   - { option: "gcache.size", value: "{{ galera_gcache_size }}" }
131 125
 galera_wsrep_sst_auth_user: "root"
132 126
 galera_wsrep_sst_auth_password: "{{ galera_root_password  }}"
133 127
 
134
-# Enable compression of backups.
135
-galera_xtrabackup_compression: "{{ (ansible_architecture == 'x86_64') or (ansible_architecture == 'ppc64le' and ansible_distribution == 'Ubuntu') }}"
136
-# xtrabackup parallel/compression/sync threads
137
-galera_xtrabackup_threads: 4
128
+# mariabackup parallel/sync threads
129
+galera_mariabackup_threads: 4
138 130
 
139 131
 # Galera slow/unindexed query logging
140 132
 galera_slow_query_logging: 0
@@ -156,16 +148,6 @@ galera_server_distro_package_pins:
156 148
   - package: '*'
157 149
     release: MariaDB
158 150
     priority: 1001
159
-  # Blacklist 10.1.27 release due to https://jira.mariadb.org/browse/MDEV-13908
160
-  # which causes MariaDB to segfault with galera enabled.
161
-  - package: mariadb-server
162
-    version: 10.1.27+maria-1~xenial
163
-    priority: -1
164
-  # TODO(evrardjp): Remove pin when clustering issue is figured out
165
-  # Clustering issue
166
-  - package: mariadb-server
167
-    version: 10.1.31+maria-1~xenial
168
-    priority: -1
169 151
 
170 152
 # Galera Server SSL functionality.
171 153
 

+ 5
- 0
releasenotes/notes/disable-compression-e4074dcef9f85c36.yaml View File

@@ -0,0 +1,5 @@
1
+---
2
+deprecations:
3
+  - The compression option has been removed due to the fact that it's not
4
+    recommended by MariaDB anymore.  This means that all the dependencies from
5
+    Percona such as QPress are no longer necessary.

+ 4
- 0
releasenotes/notes/use-mariabackup-46ae988b43abda06.yaml View File

@@ -0,0 +1,4 @@
1
+---
2
+features:
3
+  - The role now uses mariabackup in order to complete SST operations due to
4
+    the fact that this is the recommended choice from MariaDB.

+ 3
- 0
releasenotes/notes/use-mariadb-10.3.13-7801fd46c5c9ce89.yaml View File

@@ -0,0 +1,3 @@
1
+---
2
+features:
3
+  - This role now ships with the latest MariaDB release of 10.3.13.

+ 1
- 17
tasks/galera_install.yml View File

@@ -15,23 +15,7 @@
15 15
 
16 16
 - name: Prepare the package list
17 17
   set_fact:
18
-    galera_packages_list: |-
19
-      {% set packages = galera_server_required_distro_packages + galera_server_mariadb_distro_packages %}
20
-      {% if ansible_architecture == 'x86_64' %}
21
-      {%   set _ = packages.extend(galera_server_percona_distro_packages) %}
22
-      {% endif %}
23
-      {% if ansible_architecture == 'ppc64le' and ansible_distribution == 'Ubuntu' %}
24
-      {%   for extra_package in galera_server_percona_distro_packages_alt_arch[ansible_architecture] %}
25
-      {%     set _package_path = galera_server_extra_package_path ~ '/' ~ ansible_architecture %}
26
-      {%     set _ = packages.append(_package_path ~ '/' ~ extra_package['url'] | basename) %}
27
-      {%   endfor %}
28
-      {% endif %}
29
-      {{ packages }}
30
-
31
-- name: Download the extra packages
32
-  include_tasks: galera_install_download_extra_packages.yml
33
-  when:
34
-    - ansible_architecture == 'ppc64le'
18
+    galera_packages_list: "{{ galera_server_required_distro_packages + galera_server_mariadb_distro_packages }}"
35 19
 
36 20
 - include_tasks: "galera_install_{{ ansible_pkg_mgr }}.yml"
37 21
 

+ 1
- 10
tasks/galera_install_apt.yml View File

@@ -42,7 +42,6 @@
42 42
     state: absent
43 43
   with_items:
44 44
     - { name: "MariaDB", repo: "{{ galera_repo.repo }}" }
45
-    - { name: "Percona", repo: "{{ galera_percona_xtrabackup_repo.repo }}" }
46 45
 
47 46
 - name: Add galera repo
48 47
   apt_repository:
@@ -52,14 +51,6 @@
52 51
     update_cache: "no"
53 52
   register: add_galera_repo
54 53
 
55
-- name: Add percona repo
56
-  apt_repository:
57
-    repo: "{{ galera_percona_xtrabackup_repo.repo }}"
58
-    filename: "{{ galera_percona_xtrabackup_repo.filename | default(omit) }}"
59
-    state: "{{ galera_percona_xtrabackup_repo.state }}"
60
-    update_cache: "no"
61
-  register: add_percona_repo
62
-
63 54
 - name: Preseed galera password(s)
64 55
   debconf:
65 56
     name: "{{ item.name }}"
@@ -81,7 +72,7 @@
81 72
   apt:
82 73
     update_cache: yes
83 74
   when:
84
-    - add_galera_repo is changed or add_percona_repo is changed
75
+    - add_galera_repo is changed
85 76
   register: update_apt_cache
86 77
   until: update_apt_cache is success
87 78
   retries: 5

+ 0
- 47
tasks/galera_install_download_extra_packages.yml View File

@@ -1,47 +0,0 @@
1
----
2
-# Copyright 2016, Rackspace US, Inc.
3
-#
4
-# Licensed under the Apache License, Version 2.0 (the "License");
5
-# you may not use this file except in compliance with the License.
6
-# You may obtain a copy of the License at
7
-#
8
-#     http://www.apache.org/licenses/LICENSE-2.0
9
-#
10
-# Unless required by applicable law or agreed to in writing, software
11
-# distributed under the License is distributed on an "AS IS" BASIS,
12
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
-# See the License for the specific language governing permissions and
14
-# limitations under the License.
15
-
16
-- name: Ensure that galera_server_extra_package_paths exist
17
-  file:
18
-    path: "{{ galera_server_extra_package_path }}/{{ item.key }}"
19
-    state: directory
20
-  with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}"
21
-  delegate_to: "{{ (galera_server_extra_package_downloader == 'deployment-host') | ternary('localhost', inventory_hostname) }}"
22
-
23
-- name: Download extra packages
24
-  get_url:
25
-    url: "{{ item.url }}"
26
-    dest: "{{ galera_server_extra_package_path }}/{{ galera_server_percona_distro_packages_alt_arch.keys()[0] }}/"
27
-    checksum: "{{ item.checksum | default(omit) }}"
28
-    force: "{{ item.checksum is not defined }}"
29
-    validate_certs: "{{ galera_server_extra_package_validate_certs }}"
30
-  with_items: "{{ galera_server_percona_distro_packages_alt_arch.values() | flatten | list }}"
31
-  register: fetch_url
32
-  until: fetch_url is success
33
-  retries: 3
34
-  delay: 10
35
-  delegate_to: "{{ (galera_server_extra_package_downloader == 'deployment-host') | ternary('localhost', inventory_hostname) }}"
36
-
37
-- name: Copy downloaded packages from deployment-host to target-host
38
-  copy:
39
-    src: "{{ galera_server_extra_package_path }}/{{ item.key }}/{{ item.value.url | basename }}"
40
-    dest: "{{ galera_server_extra_package_path }}/{{ item.key }}/"
41
-  with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}"
42
-  when:
43
-    - galera_server_extra_package_downloader == "deployment-host"
44
-  register: file_copy
45
-  until: file_copy is success
46
-  retries: 5
47
-  delay: 10

+ 1
- 15
tasks/galera_install_yum.yml View File

@@ -115,20 +115,6 @@
115 115
   retries: 5
116 116
   delay: 2
117 117
 
118
-- name: Install percona repo
119
-  yum_repository:
120
-    name: 'percona-release-$basearch'
121
-    description: 'Percona-Release YUM repository - $basearch'
122
-    baseurl: "{{ galera_percona_xtrabackup_repo.repo }}"
123
-    enabled: true
124
-    gpgcheck: true
125
-    state: "{{ galera_percona_xtrabackup_repo.state }}"
126
-    priority: 25
127
-  register: add_percona_repos
128
-  until: add_percona_repos is success
129
-  retries: 5
130
-  delay: 2
131
-
132 118
 # When changing the repo URL, the metadata does
133 119
 # not reliably update, resulting in the right
134 120
 # URL being used, but the wrong package list.
@@ -138,7 +124,7 @@
138 124
   command: "{{ ansible_pkg_mgr }} clean metadata"
139 125
   args:
140 126
     warn: no
141
-  when: (add_galera_repos is changed) or (add_percona_repos is changed)
127
+  when: add_galera_repos is changed
142 128
   tags:
143 129
     - skip_ansible_lint
144 130
 

+ 0
- 18
tasks/galera_install_zypper.yml View File

@@ -71,11 +71,6 @@
71 71
   retries: 5
72 72
   delay: 2
73 73
 
74
-- name: Fail if upstream Percona is selected
75
-  fail:
76
-    msg: "Using upstream Percona packages is unsupported on SUSE"
77
-  when: use_percona_upstream
78
-
79 74
 - name: Add galera repo
80 75
   zypper_repository:
81 76
     name: "{{ galera_repo.name }}"
@@ -89,19 +84,6 @@
89 84
   retries: 5
90 85
   delay: 2
91 86
 
92
-- name: Install percona repo
93
-  zypper_repository:
94
-    name: "{{ galera_percona_xtrabackup_repo.name }}"
95
-    description: "{{ galera_percona_xtrabackup_repo.description }}"
96
-    repo: "{{ galera_percona_xtrabackup_repo.repo }}"
97
-    autorefresh: yes
98
-    auto_import_keys: yes
99
-    state: "{{ galera_percona_xtrabackup_repo.state }}"
100
-  register: add_repos
101
-  until: add_repos is success
102
-  retries: 5
103
-  delay: 2
104
-
105 87
 - name: Install galera_server role remote packages (zypper)
106 88
   zypper:
107 89
     name: "{{ galera_packages_list }}"

+ 0
- 9
tasks/main.yml View File

@@ -29,15 +29,6 @@
29 29
   tags:
30 30
     - always
31 31
 
32
-- name: Fail if compression is enabled on unsupported architecture/distro
33
-  fail:
34
-    msg: |
35
-      qpress compression is only supported for x86_64 and for Ubuntu/ppc64le
36
-  when:
37
-    - galera_xtrabackup_compression | bool
38
-    - (ansible_architecture != 'x86_64') and
39
-      not (ansible_architecture == 'ppc64le' and ansible_distribution == 'Ubuntu')
40
-
41 32
 - name: Gather variables for each operating system
42 33
   include_vars: "{{ item }}"
43 34
   with_first_found:

+ 2
- 7
templates/cluster.cnf.j2 View File

@@ -46,10 +46,5 @@ wsrep_cluster_name = "{{ galera_cluster_name }}"
46 46
 # how many times to retry deadlocked autocommits
47 47
 wsrep_retry_autocommit = {{ galera_wsrep_retry_autocommit }}
48 48
 
49
-[xtrabackup]
50
-{% if galera_xtrabackup_compression | bool %}
51
-compress
52
-compress-threads = {{ galera_xtrabackup_threads }}
53
-{% endif %}
54
-parallel = {{ galera_xtrabackup_threads }}
55
-rebuild-threads = {{ galera_xtrabackup_threads }}
49
+[mariabackup]
50
+parallel = {{ galera_mariabackup_threads }}

+ 0
- 6
vars/gentoo.yml View File

@@ -47,12 +47,6 @@ galera_server_upgrade_packages_remove:
47 47
 
48 48
 galera_mariadb_service_name: "mariadb"
49 49
 
50
-galera_server_percona_distro_packages:
51
-  - dev-db/percona-toolkit
52
-  - dev-db/percona-xtrabackup-bin
53
-  - "{{ (galera_xtrabackup_compression | bool) | ternary('app-arch/qpress', '') }}"
54
-
55 50
 galera_wsrep_provider: "/usr/lib64/galera/libgalera_smm.so"
56 51
 
57
-_use_percona_upstream: no
58 52
 mysql_service_name: mariadb

+ 1
- 14
vars/redhat-7.yml View File

@@ -17,9 +17,6 @@
17 17
 _galera_gpg_keys:
18 18
   # MariaDB Package Signing Key <package-signing-key@mariadb.org>
19 19
   - key: /etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB
20
-  # Percona MySQL Development Team <mysql-dev@percona.com>
21
-  - key: /etc/pki/rpm-gpg/RPM-GPG-KEY-Percona
22
-  - key: /etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
23 20
 
24 21
 # Default private device setting
25 22
 # This provides some additional security, but it causes problems with creating
@@ -47,6 +44,7 @@ _galera_mariadb_server_package: "MariaDB-server"
47 44
 galera_server_mariadb_distro_packages:
48 45
   - which
49 46
   - "{{ galera_mariadb_server_package }}"
47
+  - MariaDB-backup
50 48
   - MariaDB-shared
51 49
   - rsync
52 50
   - socat
@@ -70,15 +68,4 @@ _galera_repo:
70 68
   description: "MariaDB Repo"
71 69
   baseurl: "{{ galera_repo_url }}"
72 70
 
73
-_galera_percona_xtrabackup_repo:
74
-  repo: "http://{{ galera_percona_xtrabackup_repo_host | default('repo.percona.com') }}/release/$releasever/RPMS/$basearch"
75
-  state: "{{ (use_percona_upstream | bool) | ternary('present', 'absent') }}"
76
-
77
-galera_server_percona_distro_packages:
78
-  - percona-toolkit
79
-  - percona-xtrabackup-24
80
-  - "{{ (galera_xtrabackup_compression | bool) | ternary('qpress', '') }}"
81
-
82 71
 galera_wsrep_provider: "/usr/lib/galera/libgalera_smm.so"
83
-
84
-_use_percona_upstream: "{{ ansible_architecture == 'x86_64' }}"

+ 1
- 15
vars/suse.yml View File

@@ -41,6 +41,7 @@ _galera_mariadb_server_package: "MariaDB-server"
41 41
 galera_server_mariadb_distro_packages:
42 42
   - which
43 43
   - "{{ galera_mariadb_server_package }}"
44
+  - MariaDB-backup
44 45
   - MariaDB-shared
45 46
   - rsync
46 47
   - socat
@@ -66,24 +67,9 @@ _galera_repo:
66 67
   description: "MariaDB Repo"
67 68
   baseurl: "{{ galera_repo_url }}"
68 69
 
69
-# NOTE(hwoarang): Extra repository is only needed for 42.3. If this starts failig due to network issues we should
70
-# simply pin 10.1.31 to Leap 42.3
71
-_galera_percona_xtrabackup_repo:
72
-  name: "OBS:home:markoschandras:osa"
73
-  description: "OBS OpenStack Ansible repository"
74
-  repo: "https://download.opensuse.org/repositories/home:/markoschandras:/osa/openSUSE_Leap_{{ ansible_distribution_version }}"
75
-  state: "{{ (ansible_distribution_major_version == '42') | ternary('present', 'absent') }}"
76
-
77
-galera_server_percona_distro_packages:
78
-  - percona-toolkit
79
-  - percona-xtrabackup
80
-  - "{{ (galera_xtrabackup_compression | bool) | ternary('qpress', '') }}"
81
-
82 70
 galera_wsrep_provider: "/usr/lib64/galera/libgalera_smm.so"
83 71
 
84 72
 mariadb_delete_etc_conf_files:
85 73
   - default_plugins.cnf
86 74
   - galera.cnf
87 75
   - error_log.cnf
88
-
89
-_use_percona_upstream: no

+ 2
- 23
vars/ubuntu.yml View File

@@ -24,9 +24,6 @@ _galera_gpg_keys:
24 24
   # MariaDB Signing Key <signing-key@mariadb.org>
25 25
   - id: C74CD1D8
26 26
     file: /etc/ssl/mariadb-key
27
-  # Percona MySQL Development Team (Packaging key) <mysql-dev@percona.com>
28
-  - id: 8507EFA5
29
-    file: /etc/ssl/percona-pkg-key
30 27
 
31 28
 galera_server_required_distro_packages:
32 29
   - apt-transport-https
@@ -56,6 +53,7 @@ _galera_mariadb_server_package: "mariadb-server-{{ galera_major_version }}"
56 53
 galera_server_mariadb_distro_packages:
57 54
   - libmariadb-dev
58 55
   - mariadb-client
56
+  - mariadb-backup
59 57
   - "{{ galera_mariadb_server_package }}"
60 58
   - galera-3
61 59
   - rsync
@@ -78,30 +76,11 @@ galera_debconf_items:
78 76
     value: "{{ galera_root_password }}"
79 77
     vtype: "string"
80 78
 
81
-galera_server_percona_distro_packages:
82
-  - percona-toolkit
83
-  - percona-xtrabackup-24
84
-  - "{{ (galera_xtrabackup_compression | bool) | ternary('qpress', '') }}"
85
-
86 79
 # Repositories
87
-_galera_percona_xtrabackup_repo:
88
-  repo: "deb http://{{ galera_percona_xtrabackup_repo_host | default('repo.percona.com') }}/apt {{ ansible_distribution_release }} main"
89
-  state: "{{ (use_percona_upstream | bool) | ternary('present', 'absent') }}"
90
-  filename: "Percona"
91
-
92 80
 _galera_repo_url: "http://{{ galera_repo_host }}/MariaDB/mariadb-{{ galera_major_version }}.{{ galera_minor_version }}/repo/ubuntu"
93 81
 _galera_repo:
94 82
   repo: "deb {{ galera_repo_url }} {{ ansible_distribution_release }} main"
95 83
   state: "present"
96 84
   filename: "MariaDB"
97 85
 
98
-galera_wsrep_provider: "/usr/lib/galera/libgalera_smm.so"
99
-
100
-_use_percona_upstream: "{{ ansible_architecture == 'x86_64' }}"
101
-
102
-galera_server_percona_distro_packages_alt_arch:
103
-  ppc64le:
104
-    - url: "http://public.dhe.ibm.com/systems/virtualization/Novalink/misc/percona-xtrabackup/percona-xtrabackup-24_2.4.5-1_ppc64el.deb"
105
-      checksum: "sha256:3d4e4112f4c8020c9190a91d962dabed1dfaad307160a939e121208887eaee2a"
106
-    - url: "http://public.dhe.ibm.com/systems/virtualization/Novalink/misc/qpress/qpress_11-1_ppc64el.deb"
107
-      checksum: "sha256:a31d3e00dbcec9b3f98eae82b261d054d0b80a57f4a38967d0e953811cb082f3"
86
+galera_wsrep_provider: "/usr/lib/galera/libgalera_smm.so"

Loading…
Cancel
Save