diff --git a/scripts/gate-check-commit.sh b/scripts/gate-check-commit.sh index 548d799f4a..ab5a5c9ed3 100755 --- a/scripts/gate-check-commit.sh +++ b/scripts/gate-check-commit.sh @@ -189,7 +189,7 @@ if [[ "${ACTION}" == "upgrade" ]]; then unset VIRTUALENV_OPTIONS # Kick off the data plane tester - ${OSA_CLONE_DIR}/tests/data-plane-test.sh & + bash ${OSA_CLONE_DIR}/tests/data-plane-test.sh &> /var/log/data-plane-error.log & # Fetch script to execute API availability tests, then # background them while the upgrade runs. diff --git a/tests/data-plane-test.sh b/tests/data-plane-test.sh index 102a9bc75f..33dd15acbd 100755 --- a/tests/data-plane-test.sh +++ b/tests/data-plane-test.sh @@ -14,7 +14,7 @@ # limitations under the License. ## Shell Opts ---------------------------------------------------------------- -set -e +set -e -x ## Vars ---------------------------------------------------------------------- @@ -145,9 +145,14 @@ if [ -z ${INSTANCE_PUBLIC_ADDRESS+x} ]; then echo "INSTANCE_PUBLIC_ADDRESS=${INSTANCE_PUBLIC_ADDRESS}" >> /root/demorc fi +# Wait for the server to be ready +while [[ "$(openstack server show ${INSTANCE_UUID} --column status --format value)" != "ACTIVE" ]]; do + sleep 4 +done + # If the floating IP is not associated with the test instance, associate it -if ! openstack server show test1 --column addresses --format value | grep -q ${INSTANCE_PUBLIC_ADDRESS}; then - openstack server add floating ip ${INSTANCE_NAME} ${INSTANCE_PUBLIC_ADDRESS} +if ! openstack server show ${INSTANCE_UUID} --column addresses --format value | grep -q ${INSTANCE_PUBLIC_ADDRESS}; then + openstack server add floating ip ${INSTANCE_UUID} ${INSTANCE_PUBLIC_ADDRESS} fi # Wait for the volume to be ready