summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-03-20 16:16:42 +0100
committerSahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>2023-03-23 13:05:33 +0100
commit52246cfbf667f70dcfb1a019fcbc6aee021fe8b1 (patch)
tree9817e7b7c59d0fd918318afb5d32a8b55a07df66
parent4239bcaa56bfc6ee0bb727ab817229a116bc992b (diff)
downloadosprofiler-52246cfbf667f70dcfb1a019fcbc6aee021fe8b1.tar.gz
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
-rw-r--r--devstack/lib/osprofiler4
-rw-r--r--devstack/plugin.sh5
-rw-r--r--releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml7
3 files changed, 16 insertions, 0 deletions
diff --git a/devstack/lib/osprofiler b/devstack/lib/osprofiler
index 5176a1e..6dc7e0e 100644
--- a/devstack/lib/osprofiler
+++ b/devstack/lib/osprofiler
@@ -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
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 72c0bca..705d6ce 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -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
diff --git a/releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml b/releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml
new file mode 100644
index 0000000..47fa88f
--- /dev/null
+++ b/releasenotes/notes/drop-jaeger-container-when-unstacking-e8fcdc036f80158a.yaml
@@ -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.