Browse Source

Revert "Pre-install pip/virtualenv packages"

This reverts commit a85ce75d6b.

The reason for this revert is because it breaks CentOS dsvm jobs:

http://logs.openstack.org/35/332435/6/check/gate-ansible-role-cloud-launcher-dsvm-ansible-func-centos-7/13b3b66/logs/devstacklog.txt.gz

It is due to DevStack removing python-virtualenv by default, causing issues
as CentOS images have virtualenv installed via system-package and pip
by DIB.

Closes-Bug: 1599277
Change-Id: Ib0c01a7b3be32159e7c864a465fe9455e8d651ef
tags/1.18.1
Ricardo Carrillo Cruz 3 years ago
parent
commit
a645fa4ffb

+ 0
- 3
elements/centos-minimal/environment.d/10-centos-distro-name.bash View File

@@ -4,6 +4,3 @@ export DIB_RELEASE=${DIB_RELEASE:-7}
4 4
 # by default, enable DHCP configuration of eth0 & eth1 in network
5 5
 # scripts.  See yum-minimal for full details
6 6
 export DIB_YUM_MINIMAL_CREATE_INTERFACES=${DIB_YUM_MINIMAL_CREATE_INTERFACES:-1}
7
-
8
-# Useful for elements that work with fedora (dnf) & centos
9
-export YUM=${YUM:-yum}

+ 2
- 47
elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/01-install-pip View File

@@ -6,50 +6,5 @@ fi
6 6
 set -eu
7 7
 set -o pipefail
8 8
 
9
-if [[ $DISTRO_NAME =~ (centos|fedora) ]]; then
10
-    # GENERAL WARNING : mixing packaged python libraries with
11
-    # pip-installed versions always creates issues.  Upstream
12
-    # openstack-infra uses this a lot (especially devstack) but be
13
-    # warned: here be dragons :)
14
-
15
-    # Firstly we want to install the system packages.  Otherwise later
16
-    # on somebody does a "yum install python-virtualenv" and goes and
17
-    # overwrites the pip installed version with the packaged version,
18
-    # leading to all sorts of weird version issues.
19
-    ${YUM:-yum} install -y python-virtualenv python-pip python-setuptools
20
-
21
-    # install pip; this overwrites packaged pip
22
-    python /tmp/get-pip.py
23
-
24
-    # pip and setuptools are closely related; we want to ensure the
25
-    # latest for sanity.  Because distro packages don't include enough
26
-    # info in the egg for pip to be certain it has fully uninstalled
27
-    # the old package, for safety we clear it out by hand (this seems
28
-    # to have been a problem with very old to new updates,
29
-    # e.g. centos6 to current-era, but less so for smaller jumps).
30
-    # There is a bit of chicken-and-egg problem with pip in that it
31
-    # requires setuptools for some operations, such as wheel creation.
32
-    # But just installing setuptools shouldn't require setuptools
33
-    # itself, so we are safe for this small section.
34
-    rm -rf /usr/lib/python2.7/site-packages/setuptools*
35
-    pip install -U setuptools
36
-
37
-    # now install latest virtualenv.  it vendors stuff it needs so
38
-    # doesn't have issues with other system packages.
39
-    pip install -U virtualenv
40
-
41
-    # Add this to exclude so that we don't install a later package
42
-    # over it if it updates.  Note that fedora-minimal, bootstrapped
43
-    # via yum, can have an old yum.conf around, so look for dnf first.
44
-    if [[ -f /etc/dnf/dnf.conf ]]; then
45
-        conf=/etc/dnf/dnf.conf
46
-    elif [[ -f /etc/yum.conf ]]; then
47
-        conf=/etc/yum.conf
48
-    else
49
-        die "No conf to modify?"
50
-    fi
51
-    echo "exclude=python-virtualenv,python-pip,python-setuptools" >> ${conf}
52
-else
53
-    python /tmp/get-pip.py
54
-    pip install virtualenv
55
-fi
9
+python /tmp/get-pip.py
10
+pip install virtualenv

Loading…
Cancel
Save