Fix old branch telemetry-dsvm-integration job
Change-Id: If0711d1e74729295c4355c0d2eb5a6f545657590
This commit is contained in:
parent
3c4b67dd8a
commit
24f1bcd138
|
@ -43,6 +43,8 @@ function generate_telemetry_report(){
|
|||
openstack stack show integration_test
|
||||
echo "* Alarm list:"
|
||||
aodh alarm list
|
||||
echo "* Alarm show:"
|
||||
aodh alarm show $(aodh alarm list -f value -c alarm_id)
|
||||
echo "* Nova instance list:"
|
||||
openstack server list --all-projects
|
||||
|
||||
|
@ -54,8 +56,13 @@ function generate_telemetry_report(){
|
|||
echo "* Gnocchi instance detail:"
|
||||
gnocchi resource show -t instance $instance_id
|
||||
echo "* Gnocchi measures for instance ${instance_id}:"
|
||||
gnocchi metric show -r $instance_id cpu
|
||||
gnocchi --debug measures show -r $instance_id --aggregation rate:mean cpu
|
||||
if [[ $ZUUL_BRANCH =~ (stable/ocata|stable/pike|stable/queens|stable/rocky) ]]; then
|
||||
gnocchi metric show -r $instance_id cpu_util
|
||||
gnocchi --debug measures show -r $instance_id --aggregation mean cpu_util
|
||||
else
|
||||
gnocchi metric show -r $instance_id cpu
|
||||
gnocchi --debug measures show -r $instance_id --aggregation rate:mean cpu
|
||||
fi
|
||||
done
|
||||
|
||||
gnocchi status
|
||||
|
@ -87,11 +94,25 @@ function generate_reports_and_maybe_exit() {
|
|||
fi
|
||||
}
|
||||
|
||||
function change_config_for_old_branch() {
|
||||
local TEMPEST_CONFIG="$BASE/new/tempest/etc/tempest.conf"
|
||||
if [[ $ZUUL_BRANCH =~ (stable/ocata|stable/pike|stable/queens|stable/rocky) ]]; then
|
||||
if ! sudo grep -q "alarm_aggregation_method" "$TEMPEST_CONFIG" 2>/dev/null; then
|
||||
sudo echo -e "alarm_aggregation_method = mean" | sudo tee --append "$TEMPEST_CONFIG" > /dev/null
|
||||
sudo echo -e "alarm_metric_name = cpu_util" | sudo tee --append "$TEMPEST_CONFIG" > /dev/null
|
||||
else
|
||||
sudo sed -e "s/\(^\s*alarm_aggregation_method \s*=\).*$/\1 mean/" -i "$TEMPEST_CONFIG"
|
||||
sudo sed -e "s/\(^\s*alarm_metric_name \s*=\).*$/\1 cpu_util/" -i "$TEMPEST_CONFIG"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Run tests with tempest
|
||||
sudo chown -R tempest:stack $BASE/new/tempest
|
||||
sudo chown -R tempest:stack $BASE/data/tempest
|
||||
cd $BASE/new/tempest
|
||||
change_config_for_old_branch
|
||||
sudo -H -u tempest tox -evenv-tempest -- pip install /opt/stack/new/telemetry-tempest-plugin
|
||||
sudo -H -u tempest tox -evenv-tempest -- pip install /opt/stack/new/heat-tempest-plugin
|
||||
echo "Checking installed Tempest plugins:"
|
||||
|
|
|
@ -42,8 +42,13 @@
|
|||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat https://git.openstack.org/openstack/heat"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin heat-tempest-plugin https://git.openstack.org/openstack/heat-tempest-plugin"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"INSTALL_TEMPEST='False'"
|
||||
if [[ $ZUUL_BRANCH =~ (stable/ocata|stable/pike|stable/queens|stable/rocky) ]]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY=high"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY_TEMPEST=ceilometer-high"
|
||||
else
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY_TEMPEST=ceilometer-high-rate"
|
||||
fi
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_BACKEND=gnocchi"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"GNOCCHI_ARCHIVE_POLICY_TEMPEST=ceilometer-high-rate"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"CEILOMETER_PIPELINE_INTERVAL=15"
|
||||
function post_test_hook {
|
||||
cd /opt/stack/new/telemetry-tempest-plugin/playbooks/legacy/telemetry-dsvm-integration-tempest-plugin/
|
||||
|
|
Loading…
Reference in New Issue