From 175cfeef5c98e67299842d5ff3e36ed5e1978c4b Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Fri, 14 Sep 2018 12:00:08 +0200 Subject: [PATCH] Add a job to run full Tempest with enabled profiler Default Tempest jobs only execute tests, but do not configure osprofiler library. This patch adds a job that executes full Tempest with enabled osprofiler. Currently the job is non-voting. Depends-on: I64f30c36adbf7fb26609142f22d3e305ac9e82b5 Change-Id: Ib0ad4d22b62dba7cfea76283be2d87574f010c87 --- .zuul.yaml | 18 ++++++++++++++++++ devstack/lib/osprofiler | 5 +++++ devstack/plugin.sh | 5 +++++ 3 files changed, 28 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index ddcf1a5..bd81d84 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -15,7 +15,25 @@ jobs: - openstack-tox-functional - openstack-tox-functional-py35 + - tempest-full-py3-profiler-enabled gate: jobs: - openstack-tox-functional - openstack-tox-functional-py35 + - tempest-full-py3-profiler-enabled + +- job: + name: tempest-full-py3-profiler-enabled + parent: tempest-full-py3 + voting: false + description: | + Run full tempest on py3 with profiling enabled + required-projects: + - openstack/osprofiler + vars: + tox_envlist: full + devstack_localrc: + OSPROFILER_COLLECTOR: redis + OSPROFILER_HMAC_KEYS: SECRET_KEY + devstack_plugins: + osprofiler: https://git.openstack.org/openstack/osprofiler diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler index 4bff5ed..1848d57 100644 --- a/devstack/lib/osprofiler +++ b/devstack/lib/osprofiler @@ -85,6 +85,11 @@ function configure_osprofiler() { fi } +function configure_osprofiler_in_tempest() { + + iniset $TEMPEST_CONFIG profiler key $OSPROFILER_HMAC_KEYS +} + # Restore xtrace $XTRACE diff --git a/devstack/plugin.sh b/devstack/plugin.sh index b2b6b6d..199d138 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -14,6 +14,11 @@ if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then echo_summary "Configuring OSProfiler" configure_osprofiler + +elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then + echo_summary "Configuring Tempest" + configure_osprofiler_in_tempest + fi # Restore xtrace