From 6b8bbf8d93e12c08001a345a1f0e5311afca4a52 Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Fri, 13 Nov 2020 08:05:23 -0700 Subject: [PATCH] ensure that repo-setup ALWAYS REruns after deployment for update/upgrade The build tag was governing the repo-setup role and the build-test-packages role. The build tag should only be used for build-test-packages. The role repo-setup should always rerun first thing and be governed by the upgrade tag. Change-Id: I9ce70c2780f7bad07eae96f8142966fcf5dfc3a1 --- playbooks/multinode-overcloud-upgrade.yml | 25 +++++++++++++++++++--- playbooks/multinode-undercloud-upgrade.yml | 21 +++++++++++++++++- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/playbooks/multinode-overcloud-upgrade.yml b/playbooks/multinode-overcloud-upgrade.yml index 0d822d30e..8d4bcf3d0 100644 --- a/playbooks/multinode-overcloud-upgrade.yml +++ b/playbooks/multinode-overcloud-upgrade.yml @@ -1,9 +1,30 @@ --- -- name: Generate repo-setup script for overcloud upgrade +# the yum repos ALWAYS need to change +- name: Configure next release repository in the undercloud 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 + # 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 + +# note: in upstream CI the gerrit change is built on the content-provider +# this task will be skipped upstream +- name: Build the gerrit changes on the relevant release for the upgrade + hosts: overcloud + tags: + - build + gather_facts: false vars: repo_setup_script: "repo-setup-{{ release }}.sh" repo_setup_log: "repo-setup-{{ release }}.log" @@ -15,8 +36,6 @@ # 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 diff --git a/playbooks/multinode-undercloud-upgrade.yml b/playbooks/multinode-undercloud-upgrade.yml index 6e208d243..b072a0ffe 100644 --- a/playbooks/multinode-undercloud-upgrade.yml +++ b/playbooks/multinode-undercloud-upgrade.yml @@ -1,5 +1,25 @@ --- +# the yum repos ALWAYS need to change - name: Configure next release repository in the undercloud + hosts: undercloud + tags: + - undercloud-upgrade + vars: + repo_setup_script: "repo-setup-{{ lookup('env', 'UPGRADE_RELEASE') }}.sh" + repo_setup_log: "repo-setup-{{ lookup('env', 'UPGRADE_RELEASE') }}.log" + repo_setup_run_update: false + dlrn_hash_path: '' + dlrn_hash_path_newest: '' + # 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 + +# note: in upstream CI the gerrit change is built on the content-provider +# this task will be skipped upstream +- name: Build the gerrit changes on the relevant release for the upgrade hosts: undercloud tags: - build @@ -15,7 +35,6 @@ # this enabled, but this needs to be disabled for upgrades ib_gating_repo_update: false roles: - - role: repo-setup - role: build-test-packages - {role: install-built-repo, when: compressed_gating_repo is defined}