Allow to update AIO config prior to an upgrade

Upgraded OSA version may contain some updates to the default config
files used in CI.
For some scenarios it may be required to apply these changes prior to
the upgrade.

I tried to re-execute the whole bootstrap-aio.sh script but then I got
some issues with OVN agents after an upgrade. They were down until I
restarted neutron-server. So it is safer to only run
'prepare-aio-config' tag.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/885187
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/885188
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/885189
Change-Id: I1be9c669e9f4c996d587ef52a6d384d89b75a3f6
This commit is contained in:
Damian Dabrowski 2023-06-04 16:47:09 +02:00
parent ad5a3c1339
commit 230004a38a

View File

@ -49,6 +49,9 @@ export INSTALL_METHOD=${3:-"source"}
# enable the ARA callback plugin
export SETUP_ARA=${SETUP_ARA:-true}
# List of scenarios that update configuration files prior to the upgrade
export SCENARIOS_WITH_CONFIG_UPDATE=("tls")
## Change branch for Upgrades ------------------------------------------------
# If the action is to upgrade, then store the current SHA,
# checkout the source SHA before executing the greenfield
@ -262,6 +265,14 @@ if [[ "${ACTION}" =~ "upgrade" ]]; then
# Doing symlinking here, as bootstrap role won't be called
ln -s $ZUUL_SRC_PATH /openstack/src
fi
# Update AIO config files for certain scenarios
for item in "${SCENARIOS_WITH_CONFIG_UPDATE[@]}"; do
if [[ "${SCENARIO}" =~ "${item}" ]]; then
export BOOTSTRAP_EXTRA_PARAMS="${BOOTSTRAP_EXTRA_PARAMS:-} -t prepare-aio-config"
"${OSA_CLONE_DIR}/scripts/bootstrap-aio.sh"
break
fi
done
# To execute the upgrade script we need to provide
# an affirmative response to the warning that the
# upgrade is irreversable.