diff options
| author | Ilya Shakhat <shakhat@gmail.com> | 2019-05-15 16:47:25 +0200 |
|---|---|---|
| committer | Ilya Shakhat <shakhat@gmail.com> | 2019-05-16 12:03:00 +0200 |
| commit | 0fcc65d0d5a9df40dc53fb611a6058e18a44c654 (patch) | |
| tree | 8699630593a7a17f1ca309b85adb099b4e6afa59 /devstack/lib | |
| parent | 30049d6c901e9a36f8e1dd07bac3bdeadd20b550 (diff) | |
| download | osprofiler-0fcc65d0d5a9df40dc53fb611a6058e18a44c654.tar.gz | |
Automatic configuration of SQLAlchemy driver in DevStack
This patch adds a new type of collector "sqlalchemy".
To enable it, add the following line into DevStack local.conf:
OSPROFILER_COLLECTOR=sqlalchemy
OSProfiler DevStack plugin creates database for traces and
configures all services to use it.
SQLAlchemy driver is extend to be able to list traces.
Zuul job is added to run Tempest tests with sqlalchemy driver enabled.
Change-Id: Ia943d311d78f6dfd2e6bb884c8dca725b3b2a36b
Diffstat (limited to 'devstack/lib')
| -rw-r--r-- | devstack/lib/osprofiler | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler index 8a7351b..aaa67f3 100644 --- a/devstack/lib/osprofiler +++ b/devstack/lib/osprofiler @@ -112,9 +112,15 @@ function install_osprofiler_collector() { elif [ "$OSPROFILER_COLLECTOR" == "mongodb" ]; then install_mongodb OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-"mongodb://localhost:27017"} + elif [ "$OSPROFILER_COLLECTOR" == "sqlalchemy" ]; then + local db=`database_connection_url osprofiler` + OSPROFILER_CONNECTION_STRING=${OSPROFILER_CONNECTION_STRING:-${db}} + recreate_database osprofiler else die $LINENO "OSProfiler collector $OSPROFILER_COLLECTOR is not supported" fi + + echo ${OSPROFILER_CONNECTION_STRING} > $HOME/.osprofiler_connection_string } function configure_osprofiler() { |
