From 4d10da01e9855f07fc599935cf1080ac0a91d85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilherme=20Steinm=C3=BCller?= Date: Thu, 3 Jan 2019 13:50:54 +0000 Subject: [PATCH] Fix tempest workspace path In master it was introduced distro installs for tempest[1], and with this upgrades from Rocky to future Stein are breaking because tempest complains about existent workspace path. This patch aims to deal with this replacing the workspace path if there is already a tempest workspace with a different path. [1] https://bit.ly/2GTqemC Change-Id: I27e4f602d0db5bacb074e8389011c70ba5f3085c --- tasks/tempest_post_install.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/tempest_post_install.yml b/tasks/tempest_post_install.yml index 7ae962d5..9df44ca6 100644 --- a/tasks/tempest_post_install.yml +++ b/tasks/tempest_post_install.yml @@ -45,7 +45,15 @@ if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi - tempest init {{ tempest_workspace }} + # (guilhermesp) We are adding this conditional here to avoid + # breakage when we are upgrade from rocky to stein as the workspace + # path has been change between these two releases + if tempest workspace list | grep workspace; then + if ! tempest workspace list | grep -w {{ tempest_workspace }}; then + tempest workspace move --name workspace --path {{ tempest_workspace }} + fi + fi + tempest init {{ tempest_workspace }} exit 3 fi args: