integration tests: additional debugging infos

Change-Id: Ife244dd854f1c1067cf15600594b59cb816aa6d7
This commit is contained in:
Mehdi Abaakouk 2015-09-22 15:37:09 +02:00
parent d7f563118b
commit c0c45b57a0

View File

@ -54,16 +54,29 @@ sudo -E -H -u ${STACK_USER:-${USER}} tox -eintegration
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ] ; then
set +x
echo "* Heat stack:"
heat stack-show integration_test
echo "* Alarm list:"
ceilometer alarm-list
echo "* Nova instance list:"
openstack server list
# TODO(sileht): replace by gnocchiclient when available
echo "* Gnocchi instance list:"
curl -s -X GET -H 'Content-Type: application/json' -H "X-Auth-Token: $ADMIN_TOKEN" $GNOCCHI_SERVICE_URL/v1/resource/instance | python -m "json.tool"
for instance_id in $(openstack server list -f value -c ID); do
output=$(curl -s -X GET -H 'Content-Type: application/json' -H "X-Auth-Token: $ADMIN_TOKEN" $GNOCCHI_SERVICE_URL/v1/resource/instance/$instance_id)
echo "* Nova instance detail:"
openstack server show $instance_id
echo "* Gnocchi measures for instance ${instance_id}:"
output=$(curl -s -X GET -H 'Content-Type: application/json' -H "X-Auth-Token: $ADMIN_TOKEN" $GNOCCHI_SERVICE_URL/v1/resource/instance/$instance_id/metric/cpu_util/measures)
echo $output | python -m "json.tool" || echo -e "\n$output"
done
echo "* Unprocessed measures:"
find $GNOCCHI_DATA_DIR/measures
set -x
fi
set -e