e6cfcb29f5
The UpgradeInitCommand heat resource hasn't work for some releases, even thought it has been recovered in [0] it added some complexity to the way we were invoking tripleo-upgrade role, as we needed to load into the upgrade_init_command variable the whole content of the script we wanted to run to switch repos. For that reason it's better to relay on repo-setup role to leave the repositories switched (without packages update) prior to invoking tripleo-upgrade as it is done in the undercloud upgrade playbook. Also, as tripleo-upgrade is now being imported by zuul, there is no need to call dynamically to tripleo-upgrade as before, we can use include_role instead. Co-Authored By: Quique Llorente <ellorent@redhat.com> [0] - 9164e6adbdce69a2b7c10e1aea6c5cb309b6754e Change-Id: Ib35a971a4a4123933fb0d59c56655892fbd067a3 Closes-Bug: #1814531
51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
---
|
|
- name: Generate repo-setup script for overcloud upgrade
|
|
hosts: overcloud
|
|
tags:
|
|
- overcloud-upgrade
|
|
gather_facts: false
|
|
vars:
|
|
repo_setup_script: "repo-setup-{{ release }}.sh"
|
|
repo_setup_log: "repo-setup-{{ release }}.log"
|
|
# Avoid running yum update, only set up repos
|
|
repo_setup_run_update: false
|
|
artg_compressed_gating_repo: "${HOME}/gating_repo.tar.gz"
|
|
# This should not be enabled because the updating of the packages occurs
|
|
# durring the upgrade process. For general installation it's ok to have
|
|
# this enabled, but this needs to be disabled for upgrades
|
|
ib_gating_repo_update: false
|
|
roles:
|
|
- role: repo-setup
|
|
when: containerized_overcloud_upgrade|default(false)|bool
|
|
- role: build-test-packages
|
|
- role: install-built-repo
|
|
when: hostvars['undercloud']['compressed_gating_repo'] is defined and mixed_upgrade|default(false)|bool
|
|
|
|
- name: Prepare containers for Upgrade
|
|
hosts: undercloud
|
|
gather_facts: false
|
|
tags:
|
|
- overcloud-prep-containers
|
|
roles:
|
|
- role: overcloud-prep-containers
|
|
# This need the new repo in place.
|
|
update_containers: true
|
|
# This enable us to run it even on non-containerized overcloud deployment
|
|
# ie, ffu upgrade where deployment is on newton.
|
|
containerized_overcloud: "{{prep_container_upgrade_run|default(false)}}"
|
|
# Do not overwrite the deployment log if any.
|
|
overcloud_prep_containers_log: "upgrade_overcloud_prep_containers.log"
|
|
overcloud_prep_containers_script: "upgrade_overcloud_prep_containers.sh"
|
|
when: containerized_overcloud_upgrade|default(false)|bool
|
|
|
|
- name: Run tripleo-upgrade role to upgrade overcloud
|
|
hosts: undercloud
|
|
gather_facts: true
|
|
tags:
|
|
- overcloud-upgrade
|
|
tasks:
|
|
- name: Include TripleO upgrade role
|
|
include_role:
|
|
name: tripleo-upgrade
|
|
when: overcloud_upgrade|default(false)|bool or ffu_overcloud_upgrade|default(false)|bool
|