diff --git a/devstack/gate/devstackgaterc b/devstack/gate/devstackgaterc new file mode 100644 index 0000000..32a8ae3 --- /dev/null +++ b/devstack/gate/devstackgaterc @@ -0,0 +1,12 @@ +#!/bin/bash -xe + +export DEVSTACK_GATE_LIBVIRT_TYPE=kvm +export DEVSTACK_GATE_TEMPEST=0 +export DEVSTACK_LOCAL_CONFIG=' +COLLECTD_INSTALL=True +COLLECTD_CEILOMETER_VERBOSE=True +COLLECTD_CEILOMETER_ENABLED=True +COLLECTD_GNOCCHI_ENABLED=True +CEILOMETER_BACKEND=mysql +GNOCCHI_USE_KEYSTONE=True +' diff --git a/devstack/gate/post_test_hook_bin.sh b/devstack/gate/post_test_hook_bin.sh new file mode 100644 index 0000000..5fb58b4 --- /dev/null +++ b/devstack/gate/post_test_hook_bin.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# we need to verify that db contains collectd metrics +# give it ~10 mins + +date +echo "Stacking is finished with all endpoints/services running" +echo "Need to restart collectd, which went into some wrong state" +echo "or ceilometer-collectd-plugin timeouts before establishing" +echo "connections to both gnocchi & ceilometer" +sudo service collectd status +sudo service collectd restart + +retry_count=1 +max_retry_count=20 +export PATH=/usr/sbin:$PATH +source /opt/stack/new/devstack/openrc admin + +while [ "$retry_count" -le "$max_retry_count" ]; do + if [ $(openstack metric metric list | grep interface | wc -l) -eq 0 ] || [ $(ceilometer meter-list -l 1000 | grep interface | wc -l) -eq 0 ]; then + echo "Testing metric interface not yet visible in db $retry_count/$max_retry_count" + else + echo "Testing metric obtained from db" + exit 0 + fi + let retry_count="$retry_count+1" + sleep 30 +done + +date +echo "[ERROR] Testing metric interface not visible in db!" +echo "Let's check collectd status:" +sudo service collectd status + +exit 1 + diff --git a/devstack/gate/post_test_hook_src.sh b/devstack/gate/post_test_hook_src.sh new file mode 100644 index 0000000..5fb58b4 --- /dev/null +++ b/devstack/gate/post_test_hook_src.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# we need to verify that db contains collectd metrics +# give it ~10 mins + +date +echo "Stacking is finished with all endpoints/services running" +echo "Need to restart collectd, which went into some wrong state" +echo "or ceilometer-collectd-plugin timeouts before establishing" +echo "connections to both gnocchi & ceilometer" +sudo service collectd status +sudo service collectd restart + +retry_count=1 +max_retry_count=20 +export PATH=/usr/sbin:$PATH +source /opt/stack/new/devstack/openrc admin + +while [ "$retry_count" -le "$max_retry_count" ]; do + if [ $(openstack metric metric list | grep interface | wc -l) -eq 0 ] || [ $(ceilometer meter-list -l 1000 | grep interface | wc -l) -eq 0 ]; then + echo "Testing metric interface not yet visible in db $retry_count/$max_retry_count" + else + echo "Testing metric obtained from db" + exit 0 + fi + let retry_count="$retry_count+1" + sleep 30 +done + +date +echo "[ERROR] Testing metric interface not visible in db!" +echo "Let's check collectd status:" +sudo service collectd status + +exit 1 + diff --git a/devstack/gate/pre_test_hook_bin.sh b/devstack/gate/pre_test_hook_bin.sh new file mode 100644 index 0000000..c9990a4 --- /dev/null +++ b/devstack/gate/pre_test_hook_bin.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo collectd-ceilometer-plugin pre-test-hook executed + diff --git a/devstack/gate/pre_test_hook_src.sh b/devstack/gate/pre_test_hook_src.sh new file mode 100644 index 0000000..c9990a4 --- /dev/null +++ b/devstack/gate/pre_test_hook_src.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo collectd-ceilometer-plugin pre-test-hook executed +