Skip to content

Commit 26e468b

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Move all distros to upstream MariaDB 10.5"
2 parents c729bc2 + 4563971 commit 26e468b

File tree

9 files changed

+51
-81
lines changed

9 files changed

+51
-81
lines changed

docker/base/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ COPY dnf.conf /etc/dnf/dnf.conf
7676
'elasticsearch.repo',
7777
'grafana.repo',
7878
'influxdb.repo',
79+
'mariadb.repo',
7980
'proxysql.repo',
8081
'rabbitmq_rabbitmq-server.repo',
8182
'rabbitmq_rabbitmq-erlang.repo',
@@ -88,6 +89,7 @@ COPY dnf.conf /etc/dnf/dnf.conf
8889
'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
8990
'https://packages.grafana.com/gpg.key',
9091
'https://repos.influxdata.com/influxdb.key',
92+
'https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB',
9193
'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc',
9294
'https://packages.treasuredata.com/GPG-KEY-td-agent',
9395
'https://repo.proxysql.com/ProxySQL/repo_pub_key',
@@ -96,13 +98,15 @@ COPY dnf.conf /etc/dnf/dnf.conf
9698
{% set base_yum_repo_files = [
9799
'elasticsearch.repo',
98100
'grafana.repo',
101+
'mariadb-aarch64.repo',
99102
'proxysql.repo',
100103
'rabbitmq_rabbitmq-server.repo',
101104
'td.repo',
102105
] %}
103106

104107
{% set base_yum_repo_keys = [
105108
'https://packages.grafana.com/gpg.key',
109+
'https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB',
106110
'https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc',
107111
'https://repo.proxysql.com/ProxySQL/repo_pub_key',
108112
] %}

docker/base/mariadb-aarch64.repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[mariadb]
2+
name = MariaDB
3+
baseurl = https://downloads.mariadb.com/MariaDB/mariadb-10.5/yum/centos8-aarch64
4+
module_hotfixes = 1
5+
gpgcheck = 1
6+
enabled = 0

docker/base/mariadb.repo

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[mariadb]
2+
name = MariaDB
3+
baseurl = https://downloads.mariadb.com/MariaDB/mariadb-10.5/yum/centos8-amd64
4+
module_hotfixes = 1
5+
gpgcheck = 1
6+
enabled = 0

docker/mariadb/mariadb-server/Dockerfile.j2

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
1010
{{ macros.configure_user(name='mysql') }}
1111

1212
{# NOTE(mgoddard): EPEL required for pv package #}
13-
{{ macros.enable_extra_repos(['epel', 'mariadb']) }}
13+
{{ macros.enable_extra_repos(['epel']) }}
1414

1515
{% if base_package_type == 'rpm' %}
1616
{% set mariadb_packages = [
1717
'expect',
18-
'galera',
1918
'hostname',
2019
'mariadb-backup',
21-
'mariadb-server-galera',
22-
'mariadb-server-utils',
20+
'mariadb-server',
2321
'pv',
2422
'rsync',
2523
'tar'
2624
] %}
2725

26+
{# NOTE(yoctozepto): this is to ensure Kolla Ansible can configure MariaDB to find it #}
27+
RUN ln -s /usr/lib64/galera-4 /usr/lib64/galera
28+
2829
{% elif base_package_type == 'deb' %}
2930
{% set mariadb_packages = [
3031
'expect',
@@ -37,11 +38,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
3738

3839
COPY mariadb_sudoers /etc/sudoers.d/kolla_mariadb_sudoers
3940
COPY extend_start.sh /usr/local/bin/kolla_extend_start
40-
{% if base_distro == 'debian' %}
41-
COPY security_reset.expect.debian /usr/local/bin/kolla_security_reset
42-
{% else %}
4341
COPY security_reset.expect /usr/local/bin/kolla_security_reset
44-
{% endif %}
4542
RUN chmod 755 /usr/local/bin/kolla_extend_start \
4643
&& chmod 755 /usr/local/bin/kolla_security_reset \
4744
&& chmod 750 /etc/sudoers.d \

docker/mariadb/mariadb-server/security_reset.expect

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
#!/usr/bin/expect -f
22

33
if [catch {set timeout $env(DB_MAX_TIMEOUT)}] {set timeout 10}
4-
spawn mysql_secure_installation
4+
spawn mariadb-secure-installation
55
expect {
66
timeout { send_user "\nFailed to get 'Enter current password for root (enter for none):' prompt\n"; exit 1 }
77
eof { send_user "\nFailed to get 'Enter current password for root (enter for none):' prompt\n"; exit 1 }
88
"Enter current password for root (enter for none):"
99
}
1010
send "\r"
11+
12+
expect {
13+
timeout { send_user "\nFailed to get 'Switch to unix_socket authentication [Y/n] ' prompt\n"; exit 1 }
14+
eof { send_user "\nFailed to get 'Switch to unix_socket authentication [Y/n]' prompt\n"; exit 1 }
15+
"Switch to unix_socket authentication \\\[Y/n\\\] "
16+
}
17+
send "n\r"
18+
1119
expect {
12-
timeout { send_user "\nFailed to get 'Set root password?' prompt\n"; exit 1 }
13-
eof { send_user "\nFailed to get 'Set root password?' prompt\n"; exit 1 }
14-
"Set root password?"
20+
timeout { send_user "\nFailed to get 'Change the root password? [Y/n]' prompt\n"; exit 1 }
21+
eof { send_user "\nFailed to get 'Change the root password? [Y/n]' prompt\n"; exit 1 }
22+
"Change the root password? \\\[Y/n\\\] "
1523
}
1624
send "y\r"
25+
1726
expect {
1827
timeout { send_user "\nFailed to get 'New password:' prompt\n"; exit 1 }
1928
eof { send_user "\nFailed to get 'New password:' prompt\n"; exit 1 }

docker/mariadb/mariadb-server/security_reset.expect.debian

Lines changed: 0 additions & 67 deletions
This file was deleted.

kolla/template/repos.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ centos:
1313
kibana: "elasticsearch-kibana-logstash-7.x"
1414
libvirt: "centos-advanced-virtualization"
1515
logstash: "elasticsearch-kibana-logstash-7.x"
16+
mariadb: "mariadb"
1617
openvswitch: "centos-nfv-openvswitch"
1718
opstools: "centos-opstools"
1819
powertools: "powertools"
@@ -33,6 +34,7 @@ centos-aarch64:
3334
kibana: "elasticsearch-kibana-logstash-7.x"
3435
libvirt: "centos-advanced-virtualization"
3536
logstash: "elasticsearch-kibana-logstash-7.x"
37+
mariadb: "mariadb"
3638
openvswitch: "centos-nfv-openvswitch"
3739
opstools: "centos-opstools"
3840
powertools: "powertools"
@@ -183,7 +185,7 @@ ubuntu:
183185
component: "main"
184186
gpg_key: "elasticsearch.asc"
185187
mariadb:
186-
url: "http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu"
188+
url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu"
187189
suite: "focal"
188190
component: "main"
189191
gpg_key: "mariadb.gpg"
@@ -235,7 +237,7 @@ ubuntu-aarch64:
235237
component: "main"
236238
gpg_key: "elasticsearch.asc"
237239
mariadb:
238-
url: "http://downloads.mariadb.com/MariaDB/mariadb-10.3/repo/ubuntu"
240+
url: "http://downloads.mariadb.com/MariaDB/mariadb-10.5/repo/ubuntu"
239241
suite: "focal"
240242
component: "main"
241243
gpg_key: "mariadb.gpg"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
upgrade:
3+
- |
4+
CentOS now uses upstream MariaDB repos (thus following the images
5+
of the other two distros). This is done to simplify MariaDB version
6+
management on Kolla side.
7+
The chosen version is synced with Debian and Ubuntu to 10.5.
8+
Operators may want to reflect this in their repo mirrors and
9+
proxies.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
other:
3+
- |
4+
Ubuntu now uses MariaDB 10.5 to sync with Debian.

0 commit comments

Comments
 (0)