From 59d9cecb163c2a0ffa636b85149bb3c7e2c4626c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 2 Apr 2014 18:43:42 -0400 Subject: [PATCH] bring back oslo_clean oslo_clean is still needed at this point, removing it was premature, especially for upgrade testing. Change-Id: Ic845d835f587923423f83ac698bd825f3fa5dd1f --- clean.sh | 2 ++ lib/oslo | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/clean.sh b/clean.sh index f3b2a99fdf..3707d8411e 100755 --- a/clean.sh +++ b/clean.sh @@ -40,6 +40,7 @@ source $TOP_DIR/lib/rpc_backend source $TOP_DIR/lib/tls +source $TOP_DIR/lib/oslo source $TOP_DIR/lib/horizon source $TOP_DIR/lib/keystone source $TOP_DIR/lib/glance @@ -83,6 +84,7 @@ if [[ -d $TOP_DIR/extras.d ]]; then fi # Clean projects +cleanup_oslo cleanup_cinder cleanup_glance cleanup_keystone diff --git a/lib/oslo b/lib/oslo index 2e1f6bffa0..3cf72186a1 100644 --- a/lib/oslo +++ b/lib/oslo @@ -34,6 +34,10 @@ TASKFLOW_DIR=$DEST/taskflow # install_oslo() - Collect source and prepare function install_oslo { + # TODO(sdague): remove this once we get to Icehouse, this just makes + # for a smoother transition of existing users. + cleanup_oslo + git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH setup_install $CLIFF_DIR @@ -59,6 +63,17 @@ function install_oslo { setup_install $TASKFLOW_DIR } +# cleanup_oslo() - purge possibly old versions of oslo +function cleanup_oslo { + # this means we've got an old oslo installed, lets get rid of it + if ! python -c 'import oslo.config' 2>/dev/null; then + echo "Found old oslo.config... removing to ensure consistency" + local PIP_CMD=$(get_pip_command) + pip_install oslo.config + sudo $PIP_CMD uninstall -y oslo.config + fi +} + # Restore xtrace $XTRACE