Browse code

Move tempest plugin install to the end

For the tempest plugin install inside the tox venv to hold we need to
ensure that it's the last thing run that touches the tox venv before
devstack ends. Otherwise there is a chance we'll recreate the venv in
a later step of installing and configuring tempest. This commit
moves the plugin installation into it's own function and calls that
function as last phase of the tempest setup to make sure it runs last.

Change-Id: Ie253171537e8c5a9887cc30aba1cad4b31e57663
(cherry picked from commit 7e603d1bf8689a50ffa3dd93c901a71ea5f5ae36)

Matthew Treinish authored on 2016/06/02 07:16:14
Showing 2 changed files
... ...
@@ -13,6 +13,8 @@ if is_service_enabled tempest; then
13 13
     elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
14 14
         echo_summary "Initializing Tempest"
15 15
         configure_tempest
16
+        echo_summary "Installing Tempest Plugins"
17
+        install_tempest_plugins
16 18
     elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
17 19
         # local.conf Tempest option overrides
18 20
         :
... ...
@@ -597,6 +597,12 @@ function install_tempest {
597 597
     pushd $TEMPEST_DIR
598 598
     tox --notest -efull
599 599
     PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
600
+    popd
601
+}
602
+
603
+# install_tempest_plugins() - Install any specified plugins into the tempest venv
604
+function install_tempest_plugins {
605
+    pushd $TEMPEST_DIR
600 606
     if [[ $TEMPEST_PLUGINS != 0 ]] ; then
601 607
         tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
602 608
     fi