Remove use of upgrade_init_command from multinode-overcloud-upgrade.yml.

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
This commit is contained in:
Jose Luis Franco Arza
2019-02-04 16:48:35 +01:00
parent 612b471545
commit e6cfcb29f5

View File

@@ -1,12 +1,12 @@
---
- name: Generate repo-setup script for overcloud upgrade
hosts: undercloud
hosts: overcloud
tags:
- overcloud-upgrade
gather_facts: false
vars:
repo_run_live: false
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"
@@ -43,9 +43,8 @@
gather_facts: true
tags:
- overcloud-upgrade
vars:
repo_setup_script: "{{ working_dir }}/repo-setup-{{ release }}.sh"
roles:
- role: tripleo-upgrade
upgrade_init_command: "{{ (repo_setup_script|exists) | ternary(lookup('file', repo_setup_script), false) }}"
tasks:
- name: Include TripleO upgrade role
include_role:
name: tripleo-upgrade
when: overcloud_upgrade|default(false)|bool or ffu_overcloud_upgrade|default(false)|bool