enables experimental collectd ci job

- this change will enable testing of collectd-ceilometer-plugin
  in the upstream ci

Change-Id: Ie9e5fc1316e3a4a76945100d977313e8b3540d44
Closes-Bug: #1675072
This commit is contained in:
Michal Ptacek 2017-04-05 12:37:49 +01:00
parent 216a7e949a
commit bc326f14d7
5 changed files with 92 additions and 0 deletions

View File

@ -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
'

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo collectd-ceilometer-plugin pre-test-hook executed

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo collectd-ceilometer-plugin pre-test-hook executed