Browse code

Fix issues with grizzly

- Install a known working recent version of pip (cherry-picked from
62d1d698a0c1459)
- Don't install boto from pip let use the default from ubuntu or the
euac2ools will fails.
- Don't install netaddr from the packages let the pip do its job without
being confused.
- Skip excercises that fails on grizzly.

Change-Id: I27df3787b5b90621ea66e4cc9763365b4579e3ca

Chmouel Boudjnah authored on 2014/01/17 06:38:44
Showing 24 changed files
... ...
@@ -15,7 +15,7 @@ source $TOP_DIR/stackrc
15 15
 
16 16
 # comma separated list of script basenames to skip
17 17
 # to refrain from exercising euca.sh use SKIP_EXERCISES=euca
18
-SKIP_EXERCISES=${SKIP_EXERCISES:-""}
18
+SKIP_EXERCISES=${SKIP_EXERCISES:-"boot_from_volume,bundle,euca"}
19 19
 
20 20
 # comma separated list of script basenames to run
21 21
 # to run only euca.sh use RUN_EXERCISES=euca
... ...
@@ -1,7 +1,7 @@
1 1
 bridge-utils
2 2
 pep8
3 3
 pylint
4
-python-pip
4
+python-setuptools
5 5
 screen
6 6
 unzip
7 7
 wget
... ...
@@ -21,4 +21,3 @@ tcpdump
21 21
 euca2ools # only for testing client
22 22
 tar
23 23
 python-cmd2 # dist:precise
24
-python-netaddr
... ...
@@ -22,4 +22,3 @@ python-cherrypy3 # why?
22 22
 python-migrate
23 23
 nodejs
24 24
 nodejs-legacy # dist:quantal
25
-python-netaddr
... ...
@@ -1,4 +1,3 @@
1
-python-setuptools
2 1
 python-dev
3 2
 python-lxml
4 3
 python-pastescript
... ...
@@ -30,7 +30,6 @@ python-greenlet
30 30
 python-libvirt
31 31
 python-libxml2
32 32
 python-routes
33
-python-netaddr
34 33
 python-numpy # used by websockify for spice console
35 34
 python-pastedeploy
36 35
 python-eventlet
... ...
@@ -41,7 +40,6 @@ python-sqlalchemy
41 41
 python-suds
42 42
 python-lockfile
43 43
 python-m2crypto
44
-python-boto
45 44
 python-kombu
46 45
 python-feedparser
47 46
 python-iso8601
... ...
@@ -4,12 +4,10 @@ iputils-ping
4 4
 iputils-arping
5 5
 mysql-server #NOPRIME
6 6
 sudo
7
-python-boto
8 7
 python-iso8601
9 8
 python-paste
10 9
 python-routes
11 10
 python-suds
12
-python-netaddr
13 11
 python-pastedeploy
14 12
 python-greenlet
15 13
 python-kombu
... ...
@@ -1,4 +1,3 @@
1
-python-setuptools
2 1
 python-gevent
3 2
 python-gflags
4 3
 python-netifaces
... ...
@@ -9,7 +9,6 @@ python-greenlet
9 9
 python-netifaces
10 10
 python-nose
11 11
 python-pastedeploy
12
-python-setuptools
13 12
 python-simplejson
14 13
 python-webob
15 14
 python-xattr
... ...
@@ -7,9 +7,8 @@ openssh
7 7
 openssl
8 8
 psmisc
9 9
 python-cmd2 # dist:opensuse-12.3
10
-python-netaddr
10
+python-setuptools
11 11
 python-pep8
12
-python-pip
13 12
 python-pylint
14 13
 python-unittest2
15 14
 python-virtualenv
... ...
@@ -15,7 +15,6 @@ python-dateutil
15 15
 python-eventlet
16 16
 python-kombu
17 17
 python-mox
18
-python-netaddr
19 18
 python-nose
20 19
 python-pep8
21 20
 python-pylint
... ...
@@ -7,8 +7,6 @@ python-Routes
7 7
 python-SQLAlchemy
8 8
 python-WebOb
9 9
 python-devel
10
-python-distribute
11
-python-setuptools # instead of python-distribute; dist:sle11sp2
12 10
 python-greenlet
13 11
 python-lxml
14 12
 python-mysql
... ...
@@ -22,7 +22,6 @@ python-PasteDeploy
22 22
 python-Routes
23 23
 python-SQLAlchemy
24 24
 python-Tempita
25
-python-boto
26 25
 python-carrot
27 26
 python-cheetah
28 27
 python-eventlet
... ...
@@ -34,7 +33,6 @@ python-lockfile
34 34
 python-lxml # needed for glance which is needed for nova --- this shouldn't be here
35 35
 python-mox
36 36
 python-mysql
37
-python-netaddr
38 37
 python-numpy # needed by websockify for spice console
39 38
 python-paramiko
40 39
 python-python-gflags
... ...
@@ -4,13 +4,11 @@ ebtables
4 4
 iptables
5 5
 iputils
6 6
 mysql-community-server # NOPRIME
7
-python-boto
8 7
 python-eventlet
9 8
 python-greenlet
10 9
 python-iso8601
11 10
 python-kombu
12 11
 python-mysql
13
-python-netaddr
14 12
 python-Paste
15 13
 python-PasteDeploy
16 14
 python-pyudev
... ...
@@ -1,5 +1,3 @@
1
-python-distribute
2
-python-setuptools # instead of python-distribute; dist:sle11sp2
3 1
 python-Sphinx
4 2
 python-gevent
5 3
 python-netifaces
... ...
@@ -6,8 +6,6 @@ python-WebOb
6 6
 python-configobj
7 7
 python-coverage
8 8
 python-devel
9
-python-distribute
10
-python-setuptools # instead of python-distribute; dist:sle11sp2
11 9
 python-eventlet
12 10
 python-greenlet
13 11
 python-netifaces
... ...
@@ -6,9 +6,8 @@ openssh-server
6 6
 openssl
7 7
 psmisc
8 8
 pylint
9
-python-netaddr
10 9
 python-pep8
11
-python-pip
10
+python-setuptools
12 11
 python-unittest2
13 12
 python-virtualenv
14 13
 screen
... ...
@@ -6,7 +6,6 @@ mod_wsgi  # NOPRIME
6 6
 pylint
7 7
 python-anyjson
8 8
 python-BeautifulSoup
9
-python-boto
10 9
 python-coverage
11 10
 python-dateutil
12 11
 python-eventlet
... ...
@@ -15,7 +14,6 @@ python-httplib2
15 15
 python-kombu
16 16
 python-migrate
17 17
 python-mox
18
-python-netaddr
19 18
 python-nose
20 19
 python-paste
21 20
 python-paste-deploy
... ...
@@ -4,7 +4,6 @@ python-paste
4 4
 python-paste-deploy
5 5
 python-paste-script
6 6
 python-routes
7
-python-setuptools
8 7
 python-sqlalchemy
9 8
 python-sqlite2
10 9
 python-webob
... ...
@@ -15,7 +15,6 @@ numpy # needed by websockify for spice console
15 15
 m2crypto
16 16
 mysql-server # NOPRIME
17 17
 parted
18
-python-boto
19 18
 python-carrot
20 19
 python-cheetah
21 20
 python-eventlet
... ...
@@ -27,7 +26,6 @@ python-kombu
27 27
 python-lockfile
28 28
 python-migrate
29 29
 python-mox
30
-python-netaddr
31 30
 python-paramiko
32 31
 python-paste
33 32
 python-paste-deploy
... ...
@@ -4,12 +4,10 @@ ebtables
4 4
 iptables
5 5
 iputils
6 6
 mysql-server # NOPRIME
7
-python-boto
8 7
 python-eventlet
9 8
 python-greenlet
10 9
 python-iso8601
11 10
 python-kombu
12
-python-netaddr
13 11
 python-paste
14 12
 python-paste-deploy
15 13
 python-qpid
... ...
@@ -1,4 +1,3 @@
1
-python-setuptools
2 1
 python-gevent
3 2
 python-gflags
4 3
 python-netifaces
... ...
@@ -9,7 +9,6 @@ python-greenlet
9 9
 python-netifaces
10 10
 python-nose
11 11
 python-paste-deploy
12
-python-setuptools
13 12
 python-simplejson
14 13
 python-webob
15 14
 pyxattr
... ...
@@ -533,6 +533,9 @@ set -o xtrace
533 533
 echo_summary "Installing package prerequisites"
534 534
 source $TOP_DIR/tools/install_prereqs.sh
535 535
 
536
+# Configure an appropriate python environment
537
+$TOP_DIR/tools/install_pip.sh
538
+
536 539
 install_rpc_backend
537 540
 
538 541
 if is_service_enabled $DATABASE_BACKENDS; then
539 542
new file mode 100755
... ...
@@ -0,0 +1,118 @@
0
+#!/usr/bin/env bash
1
+
2
+# **install_pip.sh**
3
+
4
+# install_pip.sh [--pip-version <version>] [--use-get-pip] [--setuptools] [--force]
5
+#
6
+# Update pip and friends to a known common version
7
+
8
+# Assumptions:
9
+# - currently we try to leave the system setuptools alone, install
10
+#   the system package if it is not already present
11
+# - update pip to $INSTALL_PIP_VERSION
12
+
13
+# Keep track of the current directory
14
+TOOLS_DIR=$(cd $(dirname "$0") && pwd)
15
+TOP_DIR=`cd $TOOLS_DIR/..; pwd`
16
+
17
+# Change dir to top of devstack
18
+cd $TOP_DIR
19
+
20
+# Import common functions
21
+source $TOP_DIR/functions
22
+
23
+FILES=$TOP_DIR/files
24
+
25
+# Handle arguments
26
+
27
+INSTALL_PIP_VERSION=${INSTALL_PIP_VERSION:-"1.4"}
28
+while [[ -n "$1" ]]; do
29
+    case $1 in
30
+        --force)
31
+            FORCE=1
32
+            ;;
33
+        --pip-version)
34
+            INSTALL_PIP_VERSION="$2"
35
+            shift
36
+            ;;
37
+        --setuptools)
38
+            SETUPTOOLS=1
39
+            ;;
40
+        --use-get-pip)
41
+            USE_GET_PIP=1;
42
+            ;;
43
+    esac
44
+    shift
45
+done
46
+
47
+SETUPTOOLS_EZ_SETUP_URL=https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
48
+PIP_GET_PIP_URL=https://raw.github.com/pypa/pip/master/contrib/get-pip.py
49
+PIP_TAR_URL=https://pypi.python.org/packages/source/p/pip/pip-$INSTALL_PIP_VERSION.tar.gz
50
+
51
+GetDistro
52
+echo "Distro: $DISTRO"
53
+
54
+function get_versions() {
55
+    PIP=$(which pip 2>/dev/null || which pip-python 2>/dev/null)
56
+    if [[ -n $PIP ]]; then
57
+        DISTRIBUTE_VERSION=$($PIP freeze | grep 'distribute==')
58
+        SETUPTOOLS_VERSION=$($PIP freeze | grep 'setuptools==')
59
+        PIP_VERSION=$($PIP --version | awk '{ print $2}')
60
+        echo "pip: $PIP_VERSION  setuptools: $SETUPTOOLS_VERSION  distribute: $DISTRIBUTE_VERSION"
61
+    fi
62
+}
63
+
64
+function setuptools_ez_setup() {
65
+    if [[ ! -r $FILES/ez_setup.py ]]; then
66
+        (cd $FILES; \
67
+         curl -OR $SETUPTOOLS_EZ_SETUP_URL; \
68
+        )
69
+    fi
70
+    sudo python $FILES/ez_setup.py
71
+}
72
+
73
+function install_get_pip() {
74
+    if [[ ! -r $FILES/get-pip.py ]]; then
75
+        (cd $FILES; \
76
+            curl $PIP_GET_PIP_URL; \
77
+        )
78
+    fi
79
+    sudo python $FILES/get-pip.py
80
+}
81
+
82
+function install_pip_tarball() {
83
+    curl -O $PIP_TAR_URL
84
+    tar xvfz pip-$INSTALL_PIP_VERSION.tar.gz
85
+    cd pip-$INSTALL_PIP_VERSION
86
+    sudo python setup.py install
87
+}
88
+
89
+# Show starting versions
90
+get_versions
91
+
92
+# Do setuptools
93
+if [[ -n "$SETUPTOOLS" ]]; then
94
+    # We want it from source
95
+    uninstall_package python-setuptools
96
+    setuptools_ez_setup
97
+else
98
+    # See about installing the distro setuptools
99
+    if ! python -c "import setuptools"; then
100
+        install_package python-setuptools
101
+    fi
102
+fi
103
+
104
+# Do pip
105
+if [[ -z $PIP || "$PIP_VERSION" != "$INSTALL_PIP_VERSION" || -n $FORCE ]]; then
106
+
107
+    # Eradicate any and all system packages
108
+    uninstall_package python-pip
109
+
110
+    if [[ -n "$USE_GET_PIP" ]]; then
111
+        install_get_pip
112
+    else
113
+        install_pip_tarball
114
+    fi
115
+
116
+    get_versions
117
+fi