tripleo-heat-templates/environments/lifecycle/upgrade-prepare.yaml
Jose Luis Franco Arza 4ee64076fb Set up right DNF module stream for Upgrades and Updates.
To ensure we get the right package versions we need to
make sure the right stream is configured for the
container-tools module.

This patch leverages the dnf module, which when passing as name
the @ identifier allows us to enable a stream for some specific
module [0], configuring the stream passed in DnfStreams heat parameter
in updates/upgrades task for step0.

If the stream passed in such parameter is alredy set, then the
module won't do anything else. On the contrary, it will disable
the current stream, enable the ones from DnfStreams and synchronize
the content.

By default the new Heat parameter defaults to empty list and it is
in the environment files where we set the right values depending
on the operation to perform (undercloud upgrade, overcloud update
or overcloud upgrade).

*****************************************************************
*BACKPORT NOTE: Add DNF module stream virt:8.2 in the overcloud *
*upgrade/update environment files.                              *
*****************************************************************

[0] - https://docs.ansible.com/ansible/latest/modules/dnf_module.html#examples
Closes-Bug: #1890631
Resolves: rhbz#1866479

Change-Id: Ib388af0a06bbb6172593dc2fd19748b770b2e335
(cherry picked from commit 4c2d5927e6)
2020-12-22 06:39:56 +00:00

21 lines
773 B
YAML

# Environment file used in the first step of an overcloud upgrade.
# This file is required by the tripleoclient and not expected to be updated
# by the operator. Please use additional -e env.yaml.
resource_registry:
OS::TripleO::Tasks::*PreConfig: OS::Heat::None
OS::TripleO::Tasks::*PostConfig: OS::Heat::None
# Deprecated/Name changed services
OS::TripleO::Services::MongoDb: OS::Heat::None
parameter_defaults:
CephAnsiblePlaybook: default
EnablePackageInstall: true
ServerDeletionPolicy: retain
UpgradeLevelNovaCompute: auto
UpgradeLeappToRemove: ['openvswitch2.11','ovn2.11']
UpgradeLeappToInstall: ['openvswitch2.13','ovn2.13']
UpgradeInitCommonCommand: |
#!/bin/bash
set -eu
DnfStreams: [{'module':'container-tools', 'stream':'2.0'}]