From 9405639e558c0ca2d2fcba05350dcd99bd80e1d5 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Mon, 16 Mar 2020 21:53:19 +0100 Subject: [PATCH] Skip operating system upgrade tasks via UpgradeLeappEnabled param. The operating system from RHEL 7 to RHEL 8 was required during the upgrade from Rocky to Stein, however it isn't anymore for the upgrade from Stein to Train. But we can't get rid of these tasks as they will be required for the three releases jump from Queens to Train. The solution has been making use of an existing heat paramter UpgradeLeappEnabled which will be set when an Operating System is required. Before, this parameter defaulted to true, but from now on it defaults to false and will be set to true during the prepare step. Change-Id: I7ac0c74726f7bbeb773d54f6909c5f647717f79a --- .../cinder/cinder-backup-pacemaker-puppet.yaml | 1 + .../cinder/cinder-volume-pacemaker-puppet.yaml | 1 + deployment/database/mysql-pacemaker-puppet.yaml | 1 + deployment/database/redis-pacemaker-puppet.yaml | 4 +++- deployment/haproxy/haproxy-pacemaker-puppet.yaml | 1 + .../manila/manila-share-pacemaker-puppet.yaml | 1 + deployment/ovn/ovn-dbs-pacemaker-puppet.yaml | 4 +++- .../pacemaker/pacemaker-baremetal-puppet.yaml | 14 ++++++-------- ...rabbitmq-messaging-notify-pacemaker-puppet.yaml | 1 + .../rabbitmq-messaging-pacemaker-puppet.yaml | 1 + .../rabbitmq-messaging-rpc-pacemaker-puppet.yaml | 1 + .../tripleo-packages-baremetal-puppet.yaml | 2 +- 12 files changed, 21 insertions(+), 11 deletions(-) diff --git a/deployment/cinder/cinder-backup-pacemaker-puppet.yaml b/deployment/cinder/cinder-backup-pacemaker-puppet.yaml index 6be2716934..18e2874613 100644 --- a/deployment/cinder/cinder-backup-pacemaker-puppet.yaml +++ b/deployment/cinder/cinder-backup-pacemaker-puppet.yaml @@ -343,6 +343,7 @@ outputs: - name: Create hiera data to upgrade cinder_backup in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set cinder_backup upgrade node facts in a single-node environment set_fact: diff --git a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml index c63fdf680b..b58ad9494a 100644 --- a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml +++ b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml @@ -330,6 +330,7 @@ outputs: - name: Create hiera data to upgrade cinder_volume in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set cinder_volume upgrade node facts in a single-node environment set_fact: diff --git a/deployment/database/mysql-pacemaker-puppet.yaml b/deployment/database/mysql-pacemaker-puppet.yaml index 5e0787bcc3..5e24849d4d 100644 --- a/deployment/database/mysql-pacemaker-puppet.yaml +++ b/deployment/database/mysql-pacemaker-puppet.yaml @@ -503,6 +503,7 @@ outputs: - name: Create hiera data to upgrade mysql in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set mysql upgrade node facts in a single-node environment set_fact: diff --git a/deployment/database/redis-pacemaker-puppet.yaml b/deployment/database/redis-pacemaker-puppet.yaml index 6d4ddd3fce..433a10096c 100644 --- a/deployment/database/redis-pacemaker-puppet.yaml +++ b/deployment/database/redis-pacemaker-puppet.yaml @@ -414,8 +414,10 @@ outputs: command: pcs resource bundle update redis-bundle storage-map add id=redis-log source-dir=/var/log/containers/redis target-dir=/var/log/redis options=rw - name: Update the redis bundle to use the new container image name command: "pcs resource bundle update redis-bundle container image={{redis_image_latest}}" - - when: + - name: Create hiera data to upgrade redis in a stepwise manner. + when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set redis upgrade node facts in a single-node environment set_fact: diff --git a/deployment/haproxy/haproxy-pacemaker-puppet.yaml b/deployment/haproxy/haproxy-pacemaker-puppet.yaml index e141a78777..cc1f87ee11 100644 --- a/deployment/haproxy/haproxy-pacemaker-puppet.yaml +++ b/deployment/haproxy/haproxy-pacemaker-puppet.yaml @@ -535,6 +535,7 @@ outputs: - name: Create hiera data to upgrade haproxy in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set haproxy upgrade node facts in a single-node environment set_fact: diff --git a/deployment/manila/manila-share-pacemaker-puppet.yaml b/deployment/manila/manila-share-pacemaker-puppet.yaml index b5d5bfd4e0..b4ff08d9c1 100644 --- a/deployment/manila/manila-share-pacemaker-puppet.yaml +++ b/deployment/manila/manila-share-pacemaker-puppet.yaml @@ -308,6 +308,7 @@ outputs: - name: Create hiera data to upgrade manila_share in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set manila_share upgrade node facts in a single-node environment set_fact: diff --git a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml index e18aa97ccb..948b2e8d6c 100644 --- a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml +++ b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml @@ -439,8 +439,10 @@ outputs: register: output retries: 5 until: output.rc == 0 - - when: + - name: Create hiera data to upgrade ovn_dbs in a stepwise manner. + when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set ovn_dbs upgrade node facts in a single-node environment set_fact: diff --git a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml index f9acaad680..b8966d4bea 100644 --- a/deployment/pacemaker/pacemaker-baremetal-puppet.yaml +++ b/deployment/pacemaker/pacemaker-baremetal-puppet.yaml @@ -100,7 +100,7 @@ parameters: UpgradeLeappEnabled: description: Use Leapp for operating system upgrade type: boolean - default: true + default: false ContainerCli: type: string default: 'podman' @@ -197,18 +197,20 @@ outputs: upgrade_tasks: - name: upgrade step 0 when: step|int == 0 - vars: - upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} block: + - name: Set fact upgrade_leapp_enabled + set_fact: + upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled} - name: Check pacemaker cluster running before upgrade tags: validation pacemaker_cluster: state=online check_and_fail=true async: 30 poll: 4 when: not upgrade_leapp_enabled|bool - - name: upgrade step 1 + - name: Create hiera data to upgrade pacemaker in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set pacemaker upgrade node facts in a single-node environment set_fact: @@ -275,16 +277,12 @@ 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 diff --git a/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml index 41b029a557..7e4436f220 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml @@ -377,6 +377,7 @@ outputs: - name: Create hiera data to upgrade oslo messaging notify in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set oslo_messaging_notify upgrade node facts in a single-node environment set_fact: diff --git a/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml index e5aa4f577c..ea300b08e9 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml @@ -378,6 +378,7 @@ outputs: - name: Create hiera data to upgrade rabbitmq in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set rabbitmq upgrade node facts in a single-node environment set_fact: diff --git a/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml index b0df14fd66..285406938d 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml @@ -383,6 +383,7 @@ outputs: - name: Create hiera data to upgrade oslo messaging rpc in a stepwise manner. when: - step|int == 1 + - upgrade_leapp_enabled|bool block: - name: set oslo_messaging_rpc upgrade node facts in a single-node environment set_fact: diff --git a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml index efeac0017e..887acbcf7f 100644 --- a/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml +++ b/deployment/tripleo-packages/tripleo-packages-baremetal-puppet.yaml @@ -54,7 +54,7 @@ parameters: UpgradeLeappEnabled: description: Use Leapp for operating system upgrade type: boolean - default: true + default: false UpgradeLeappDebug: description: Print debugging output when running Leapp type: boolean