From 1986865bd5587d303f79f54ff525b38b0bf98bb6 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 14 Jan 2020 13:24:35 +0000 Subject: [PATCH] Add MariaDB 10.3 repository for Ubuntu Bionic In order to execute the periodic job "neutron-tempest-mariadb-full", using Ubuntu Bionic and MariaDB, a newer version is needed than the default package version distributed (10.1). Devstack gates are tested with MySQL 5.7. Current Neutron DB schema is not working with the reported version 10.1. Change-Id: Ie2b5f85a9c0fc26676d44074424cf5a699303805 Related-Bug: #1855912 Related-Bug: #1841907 --- playbooks/add_mariadb_repo.yaml | 3 +++ roles/add_mariadb_repo/tasks/main.yaml | 17 +++++++++++++++++ zuul.d/tempest-singlenode.yaml | 3 +++ 3 files changed, 23 insertions(+) create mode 100644 playbooks/add_mariadb_repo.yaml create mode 100644 roles/add_mariadb_repo/tasks/main.yaml diff --git a/playbooks/add_mariadb_repo.yaml b/playbooks/add_mariadb_repo.yaml new file mode 100644 index 00000000000..54be49ba3d5 --- /dev/null +++ b/playbooks/add_mariadb_repo.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - add_mariadb_repo diff --git a/roles/add_mariadb_repo/tasks/main.yaml b/roles/add_mariadb_repo/tasks/main.yaml new file mode 100644 index 00000000000..ddf54d00b50 --- /dev/null +++ b/roles/add_mariadb_repo/tasks/main.yaml @@ -0,0 +1,17 @@ +- name: Add apt key from hkp://keyserver.ubuntu.com:80 + shell: + cmd: apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 + executable: /bin/bash + become: yes + when: + - ansible_facts['distribution_release'] == "bionic" + - ansible_facts['distribution'] == "Ubuntu" + +- name: Add MariaDB 10.3 repository (https://bugs.launchpad.net/neutron/+bug/1855912) + apt_repository: + repo: deb [arch=amd64,arm64,ppc64el] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu bionic main + state: present + become: yes + when: + - ansible_facts['distribution_release'] == "bionic" + - ansible_facts['distribution'] == "Ubuntu" diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 8710e9de5cd..cbf5f232129 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -117,6 +117,9 @@ vars: devstack_localrc: MYSQL_SERVICE_NAME: mariadb + # NOTE(ralonsoh): once MariaDB default version in Ubuntu is bumped to + # >10.1, this workaround can be removed (bug 1855912) + pre-run: playbooks/add_mariadb_repo.yaml irrelevant-files: *irrelevant-files - job: