devstack: remove jaeger container on unstack

Let's remove the docker container created with Jaeger Tracing when
unstacking, this avoid `./stack.sh` to fail when recreating the
environnement mentioning that a docker container named jaeger already
exists.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Change-Id: I785c7b23be92eb5bc4da0366f705a77c3910d5c2
This commit is contained in:
Sahid Orentino Ferdjaoui 2023-03-20 16:16:42 +01:00
parent 4239bcaa56
commit 2e898b7707
3 changed files with 16 additions and 0 deletions

View File

@ -71,6 +71,10 @@ function install_jaeger() {
pip_install jaeger-client
}
function drop_jaeger() {
sg docker -c 'docker rm jaeger --force'
}
function install_elasticsearch() {
if is_ubuntu; then
install_package docker.io

View File

@ -19,6 +19,11 @@ elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
echo_summary "Configuring Tempest"
configure_osprofiler_in_tempest
elif [[ "$1" == "unstack" ]]; then
if [ "$OSPROFILER_COLLECTOR" == "jaeger" ]; then
echo_summary "Deleting jaeger docker container"
drop_jaeger
fi
fi
# Restore xtrace

View File

@ -0,0 +1,7 @@
---
issues:
- |
Using devstack, when unstacking, the docker container running
Jaeger tracing will be deleted that to correctly clean processes
started by devstack.. This also avoid `./stack.sh` to fail when
recreating the environnement.