Browse code

bring back oslo_clean

oslo_clean is still needed at this point, removing it was
premature, especially for upgrade testing.

Change-Id: Ic845d835f587923423f83ac698bd825f3fa5dd1f

Sean Dague authored on 2014/04/03 07:43:42
Showing 2 changed files
... ...
@@ -40,6 +40,7 @@ source $TOP_DIR/lib/rpc_backend
40 40
 
41 41
 source $TOP_DIR/lib/tls
42 42
 
43
+source $TOP_DIR/lib/oslo
43 44
 source $TOP_DIR/lib/horizon
44 45
 source $TOP_DIR/lib/keystone
45 46
 source $TOP_DIR/lib/glance
... ...
@@ -83,6 +84,7 @@ if [[ -d $TOP_DIR/extras.d ]]; then
83 83
 fi
84 84
 
85 85
 # Clean projects
86
+cleanup_oslo
86 87
 cleanup_cinder
87 88
 cleanup_glance
88 89
 cleanup_keystone
... ...
@@ -34,6 +34,10 @@ TASKFLOW_DIR=$DEST/taskflow
34 34
 
35 35
 # install_oslo() - Collect source and prepare
36 36
 function install_oslo {
37
+    # TODO(sdague): remove this once we get to Icehouse, this just makes
38
+    # for a smoother transition of existing users.
39
+    cleanup_oslo
40
+
37 41
     git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH
38 42
     setup_install $CLIFF_DIR
39 43
 
... ...
@@ -59,6 +63,17 @@ function install_oslo {
59 59
     setup_install $TASKFLOW_DIR
60 60
 }
61 61
 
62
+# cleanup_oslo() - purge possibly old versions of oslo
63
+function cleanup_oslo {
64
+    # this means we've got an old oslo installed, lets get rid of it
65
+    if ! python -c 'import oslo.config' 2>/dev/null; then
66
+        echo "Found old oslo.config... removing to ensure consistency"
67
+        local PIP_CMD=$(get_pip_command)
68
+        pip_install oslo.config
69
+        sudo $PIP_CMD uninstall -y oslo.config
70
+    fi
71
+}
72
+
62 73
 # Restore xtrace
63 74
 $XTRACE
64 75