From 8c91e229b1a846b70029ed746e362482026bfc23 Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Wed, 20 Oct 2021 15:49:52 +0200 Subject: [PATCH] Remove mariadb-server packages from the host During updates/upgrades, installing mariadb-server on the host may impact the behaviour of containerized mysql. During a FFU if mariadb-server is upgraded, it may happen that the rpm scriptlets fail to start mariadb server and leave a crash log behind (tc.log). This prevents the regular online upgrade from happening. During an upgrade, mariadb-server used to be force-upgraded in the mysql service for historical reasons. It's not necessary since mysql is containerized and can trigger the same crash as explained above. During a minor update, the same reasoning can apply if RHEL channel ships a new mariadb-server rpm as scriptlets will probably leave a crash behind as well. Make sure mariadb-server is never installed, while keeping mariadb CLI if already present on the host, to avoid operational impacts. Change-Id: Ib669bb4a5fcbb493d6d5edb5999bd1d87418558b Closes-Bug: #1946742 (cherry picked from commit d33865cded7766eb8d35ce56d5eb206c2dda1ad9) --- deployment/database/mysql-pacemaker-puppet.yaml | 11 +++++------ .../tripleo-packages-baremetal-puppet.yaml | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/database/mysql-pacemaker-puppet.yaml b/deployment/database/mysql-pacemaker-puppet.yaml index 465dd85aae..e04b6c3c1c 100644 --- a/deployment/database/mysql-pacemaker-puppet.yaml +++ b/deployment/database/mysql-pacemaker-puppet.yaml @@ -359,6 +359,11 @@ outputs: container_image_latest: "{{galera_image_latest}}" when: - old_galera_image_id.stdout != new_galera_image_id.stdout + - name: Ensure mariadb-server is not installed on the host + when: step|int == 2 + yum: + name: 'mariadb-server*' + state: absent post_update_tasks: - name: Mysql bundle post update @@ -555,12 +560,6 @@ outputs: # So do not exercise the upgrade if mysql is already running. when: step|int == 3 block: - # mariadb package changes ownership of /var/lib/mysql on package - # update, so update here rather than in tripleo-package, to - # guarantee that ownership is fixed at the end of step 3 - - name: Update host mariadb packages - when: step|int == 3 - package: name=mariadb-server-galera state=latest - name: Mysql upgrade script set_fact: mysql_upgrade_script: diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index b0bd7bf030..9a1976cf9d 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -235,6 +235,7 @@ outputs: httpd kernel-devel mysql* + mariadb-server* pacemaker* python-jsonpointer qemu-kvm-common-rhev