From 1ea99147c14068b7edbaf36a23199bc93a5ef493 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 12 Feb 2021 17:58:51 +0000 Subject: [PATCH] CI: Use PATH to find kolla-ansible script This change also updates the CI test scripts to use PATH to find the kolla-ansible script, rather than relying on the file in the source checkout. Using the script in the source checkout was hiding an issue with pip install --user, although that has now been fixed in I5b47a146627d06bb3fe4a747c5f20290c726b0f9. Related-Bug: #1915527 Change-Id: I2827a657c8716a9c40391c6bdb7ff1a2a9c1260e Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/775586 --- tests/deploy-bifrost.sh | 2 +- tests/deploy.sh | 12 ++++++------ tests/reconfigure.sh | 6 +++--- tests/setup_gate.sh | 2 +- tests/test-mariadb.sh | 4 ++-- tests/upgrade-bifrost.sh | 2 +- tests/upgrade.sh | 10 +++++----- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/deploy-bifrost.sh b/tests/deploy-bifrost.sh index 86e3d15363..1a3a414d59 100755 --- a/tests/deploy-bifrost.sh +++ b/tests/deploy-bifrost.sh @@ -14,7 +14,7 @@ function deploy_bifrost { # Deploy the bifrost container. # TODO(mgoddard): add pull action when we have a local registry service in # CI. - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/deploy-bifrost + kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/deploy-bifrost } diff --git a/tests/deploy.sh b/tests/deploy.sh index 94421b08f9..4c00fd8781 100755 --- a/tests/deploy.sh +++ b/tests/deploy.sh @@ -14,14 +14,14 @@ function deploy { sudo chmod -R 777 /etc/kolla # generate self-signed certificates for the optional internal TLS tests if [[ "$TLS_ENABLED" = "True" ]]; then - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates + kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates fi # Actually do the deployment - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/deploy-prechecks - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-deploy + kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/deploy-prechecks + kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull + kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy + kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy + kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-deploy } diff --git a/tests/reconfigure.sh b/tests/reconfigure.sh index db0854cff7..d513eb3efe 100755 --- a/tests/reconfigure.sh +++ b/tests/reconfigure.sh @@ -12,9 +12,9 @@ function reconfigure { # TODO(jeffrey4l): make some configure file change and # trigger a real reconfigure - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/reconfigure-prechecks - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv reconfigure &> /tmp/logs/ansible/reconfigure - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-reconfigure + kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/reconfigure-prechecks + kolla-ansible -i ${RAW_INVENTORY} -vvv reconfigure &> /tmp/logs/ansible/reconfigure + kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-reconfigure } diff --git a/tests/setup_gate.sh b/tests/setup_gate.sh index a365cc3202..db7c81d58f 100755 --- a/tests/setup_gate.sh +++ b/tests/setup_gate.sh @@ -132,6 +132,6 @@ EOF setup_openstack_clients RAW_INVENTORY=/etc/kolla/inventory -tools/kolla-ansible -i ${RAW_INVENTORY} -e ansible_user=$USER -vvv bootstrap-servers &> /tmp/logs/ansible/bootstrap-servers +kolla-ansible -i ${RAW_INVENTORY} -e ansible_user=$USER -vvv bootstrap-servers &> /tmp/logs/ansible/bootstrap-servers prepare_images diff --git a/tests/test-mariadb.sh b/tests/test-mariadb.sh index 6d26e994a5..5fbccd7bae 100755 --- a/tests/test-mariadb.sh +++ b/tests/test-mariadb.sh @@ -11,7 +11,7 @@ export PYTHONUNBUFFERED=1 function mariadb_stop { echo "Stopping the database cluster" - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv stop --yes-i-really-really-mean-it --tags mariadb --skip-tags common + kolla-ansible -i ${RAW_INVENTORY} -vvv stop --yes-i-really-really-mean-it --tags mariadb --skip-tags common if [[ $(sudo docker ps -q | grep mariadb | wc -l) -ne 0 ]]; then echo "Failed to stop MariaDB cluster" return 1 @@ -21,7 +21,7 @@ function mariadb_stop { function mariadb_recovery { # Recover the database cluster. echo "Recovering the database cluster" - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv mariadb_recovery --tags mariadb --skip-tags common + kolla-ansible -i ${RAW_INVENTORY} -vvv mariadb_recovery --tags mariadb --skip-tags common } function test_recovery { diff --git a/tests/upgrade-bifrost.sh b/tests/upgrade-bifrost.sh index 72966166a4..c50c921ee0 100755 --- a/tests/upgrade-bifrost.sh +++ b/tests/upgrade-bifrost.sh @@ -15,7 +15,7 @@ function upgrade_bifrost { # CI. # TODO(mgoddard): make some configuration file changes and trigger a real # upgrade. - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/upgrade-bifrost + kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/upgrade-bifrost } diff --git a/tests/upgrade.sh b/tests/upgrade.sh index a712bdc016..39b6e8333d 100755 --- a/tests/upgrade.sh +++ b/tests/upgrade.sh @@ -11,12 +11,12 @@ function upgrade { RAW_INVENTORY=/etc/kolla/inventory # generate self-signed certificates for the optional internal TLS tests if [[ "$TLS_ENABLED" = "True" ]]; then - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates + kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates fi - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull-upgrade - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade - tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-upgrade + kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks + kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull-upgrade + kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade + kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-upgrade }