From 6baf5326bfb949bce61997e65570fdfc38638f47 Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Thu, 6 Jun 2019 14:09:37 +0200 Subject: [PATCH] Upgrade playbook fixes for OS upgrade These are remaining fixes for pacemaker and mysql tasks to make upgrade_steps_playbook.yaml pass on machines after operating system upgrade to EL 8. Change-Id: If8c97752463e560c60d35e10081b5105816e66f6 --- deployment/database/mysql-pacemaker-puppet.yaml | 8 ++++++++ deployment/pacemaker/pacemaker-baremetal-puppet.yaml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/deployment/database/mysql-pacemaker-puppet.yaml b/deployment/database/mysql-pacemaker-puppet.yaml index 9436e8bddb..edcd991880 100644 --- a/deployment/database/mysql-pacemaker-puppet.yaml +++ b/deployment/database/mysql-pacemaker-puppet.yaml @@ -556,6 +556,7 @@ outputs: - ' ' - - 'kolla_set_configs;' - 'chown -R mysql:mysql /var/lib/mysql;' + - 'chown -R mysql:mysql /var/log/mariadb;' - 'mysqld_safe --user=mysql --wsrep-provider=none --skip-networking --wsrep-on=off &' - 'timeout 60 sh -c ''while ! mysqladmin ping --silent; do sleep 1; done'';' - 'mysql_upgrade;' @@ -563,6 +564,13 @@ outputs: - name: Bind mounts for temporary container set_fact: mysql_upgrade_db_bind_mounts: *mysql_volumes + - name: Make sure Mysql upgrade temporary directory exists + file: + path: /tmp/mariadb-upgrade + state: directory + owner: root + group: root + mode: 0700 - name: Upgrade Mysql database from a temporary container shell: str_replace: diff --git a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml index 32f66c0360..3c3ec8a630 100644 --- a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml +++ b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml @@ -238,14 +238,20 @@ outputs: when: pacemaker_short_node_names_upgraded | length == pacemaker_short_node_names | length - name: upgrade step 2 when: step|int == 2 + vars: + upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} block: - name: Stop pacemaker cluster pacemaker_cluster: state=offline + when: not upgrade_leapp_enabled - name: upgrade step 4 when: step|int == 4 + vars: + upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} block: - name: Start pacemaker cluster pacemaker_cluster: state=online + when: not upgrade_leapp_enabled update_tasks: - name: Check pacemaker cluster running before the minor update when: step|int == 0 # TODO(marios) disabling validations?