Fix infra upgrade

Since we launch upgrade script from another bash script, we don't really alter environmental
variables, which remain to be defined in scope of gate-check-commit. So we explicitly
unset them and re-using unset 

Change-Id: I2e41323cc8dbd0e93679de9360ad6359ab90710b
This commit is contained in:
Dmitriy Rabotyagov 2022-01-26 10:06:44 +02:00 committed by Dmitriy Rabotyagov
parent 23670ccf82
commit 2eaaa4b0c5
3 changed files with 12 additions and 7 deletions

View File

@ -262,6 +262,10 @@ if [[ "${ACTION}" == "upgrade" ]]; then
echo 'YES' | bash "${OSA_CLONE_DIR}/scripts/run-upgrade.sh"
if [[ $SCENARIO =~ "infra" ]]; then
# TODO(noonedeadpunk): Remove after Y release
set -a
. ${OSA_CLONE_DIR}/scripts/upgrade-utilities/unset-ansible-env.rc
set +a
# Verify our infra setup after upgrade
openstack-ansible ${OSA_CLONE_DIR}/playbooks/healthcheck-infrastructure.yml -e osa_gather_facts=False
fi

View File

@ -166,13 +166,7 @@ function main {
unset ANSIBLE_INVENTORY
# TODO(noonedeadpunk): Remove after Y release
unset ANSIBLE_LIBRARY
unset ANSIBLE_FILTER_PLUGINS
unset ANSIBLE_ACTION_PLUGINS
unset ANSIBLE_CALLBACK_PLUGINS
unset ANSIBLE_TRANSPORT
unset ANSIBLE_STRATEGY_PLUGINS
unset ANSIBLE_CONNECTION_PLUGINS
source ${SCRIPTS_PATH}/upgrade-utilities/unset-ansible-env.rc
bootstrap_ansible

View File

@ -0,0 +1,7 @@
unset ANSIBLE_LIBRARY
unset ANSIBLE_FILTER_PLUGINS
unset ANSIBLE_ACTION_PLUGINS
unset ANSIBLE_CALLBACK_PLUGINS
unset ANSIBLE_TRANSPORT
unset ANSIBLE_STRATEGY_PLUGINS
unset ANSIBLE_CONNECTION_PLUGINS