Revert "CI: retry smoke tests and instance creation"

This reverts commit 2524ec422d.

Reason for revert: I don't think we need it anymore

Change-Id: I9f2871cf3de1a09952fc5c236da2f78e4d930bf5
This commit is contained in:
Michal Nasiadka 2023-09-04 11:39:21 +00:00
parent 375ecdde07
commit 3d228bf1a8

View File

@ -8,52 +8,11 @@ set -o pipefail
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
function test_smoke { function test_smoke {
attempts=10 openstack --debug compute service list
openstack --debug network agent list
for i in $(seq 1 ${attempts}); do openstack --debug orchestration service list
if openstack --debug compute service list; then
break
elif [[ $i -eq ${attempts} ]]; then
echo "Failed to list compute services after ${attempts} attempts"
else
echo "Cannot list compute services, retrying"
fi
sleep 10
done
for i in $(seq 1 ${attempts}); do
if openstack --debug network agent list; then
break
elif [[ $i -eq ${attempts} ]]; then
echo "Failed to list network services after ${attempts} attempts"
else
echo "Cannot list network services, retrying"
fi
sleep 10
done
for i in $(seq 1 ${attempts}); do
if openstack --debug orchestration service list; then
break
elif [[ $i -eq ${attempts} ]]; then
echo "Failed to list orchestration services after ${attempts} attempts"
else
echo "Cannot list orchestration services, retrying"
fi
sleep 10
done
if [[ $SCENARIO == "cephadm" ]] || [[ $SCENARIO == "zun" ]]; then if [[ $SCENARIO == "cephadm" ]] || [[ $SCENARIO == "zun" ]]; then
for i in $(seq 1 ${attempts}); do openstack --debug volume service list
if openstack --debug volume service list; then
break
elif [[ $i -eq ${attempts} ]]; then
echo "Failed to list volume services after ${attempts} attempts"
else
echo "Cannot list volume services, retrying"
fi
sleep 10
done
fi fi
} }
@ -207,28 +166,13 @@ function create_instance {
server_create_extra="${server_create_extra} --config-drive True" server_create_extra="${server_create_extra} --config-drive True"
fi fi
attempts=10 openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net ${server_create_extra} ${name}
for i in $(seq 1 ${attempts}); do # If the status is not ACTIVE, print info and exit 1
if openstack server create --wait --image cirros --flavor m1.tiny --key-name mykey --network demo-net ${server_create_extra} ${name}; then if [[ $(openstack server show ${name} -f value -c status) != "ACTIVE" ]]; then
# If the status is not ACTIVE, print info, delete instance (for recreation) and exit 1 echo "FAILED: Instance is not active"
# if exceeded number of attempts openstack --debug server show ${name}
if [[ $(openstack server show ${name} -f value -c status) != "ACTIVE" ]]; then return 1
echo "FAILED: Instance is not active" fi
openstack --debug server show ${name}
openstack server delete ${name}
if [[ $i -eq ${attempts} ]]; then
echo "Failed to create instance after ${attempts} attempts"
exit 1
fi
else
break
fi
else
echo "Cannot create instance, retrying"
openstack server delete ${name}
fi
sleep 10
done
} }
function delete_instance { function delete_instance {