X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=packer%2Fprovision%2Fdevstack-pre-pip.sh;h=66c398b3e7483c213710b055b2d44843d8888c39;hb=1436f8f5f24783f9d3fae45f4344377f1a32cf68;hp=43788d77f2c279f9e25a3321dd7c3023a84b1dcd;hpb=f4b9f7257925bb9a3da2a9fedda0dfe4fbc5b2db;p=releng%2Fbuilder.git diff --git a/packer/provision/devstack-pre-pip.sh b/packer/provision/devstack-pre-pip.sh index 43788d77f..66c398b3e 100644 --- a/packer/provision/devstack-pre-pip.sh +++ b/packer/provision/devstack-pre-pip.sh @@ -3,8 +3,6 @@ # force any errors to cause the script and job to end in failure set -xeu -o pipefail -# add in a test copr repo -wget http://copr.fedoraproject.org/coprs/tykeal/odl-updates/repo/epel-7/tykeal-odl-updates-epel-7.repo -O /etc/yum.repos.d/tykeal-odl-updates-epel-7.repo # Install xpath yum install -y perl-XML-XPath python-pip python-six @@ -27,8 +25,13 @@ branch=${os_branch} # strip the "stable" off of the branch branch_name=$(cut -d'/' -f2 <<< "${branch}") -wget https://bootstrap.pypa.io/get-pip.py -python get-pip.py +# Do not upgrade pip to v10. v10 does not allow uninstalling +# distutils installed packages. This fails the openstack pip installs +# below when it attempts to uninstall packages. +# devstack patch that is trying to get pip 10 working: +# https://review.openstack.org/#/c/561597/ +# wget https://bootstrap.pypa.io/get-pip.py +# python get-pip.py mkdir tmp cd tmp @@ -37,18 +40,6 @@ git clone https://github.com/openstack-dev/devstack.git (cd devstack && git checkout "${branch}") sed -e 's/#.*//' devstack/files/rpms/general | xargs yum install -y -sudo ls -al /usr/lib/py* - -sudo rm -rf /usr/lib/python3/dist-packages/yaml -sudo rm -rf /usr/lib/python3/dist-packages/PyYAML-* -sudo rm -rf /usr/lib/python3.4/dist-packages/yaml -sudo rm -rf /usr/lib/python3.4/dist-packages/PyYAML-* - -sudo rm -rf /usr/lib/python3/site-packages/yaml -sudo rm -rf /usr/lib/python3/site-packages/PyYAML-* -sudo rm -rf /usr/lib/python3.4/site-packages/yaml -sudo rm -rf /usr/lib/python3.4/site-packages/PyYAML-* - base_url=https://github.com/openstack/ for proj in $projs do @@ -61,8 +52,16 @@ done echo '---> Installing openvswitch from relevant openstack branch' yum install -y "centos-release-openstack-${branch_name}" -yum install -y --nogpgcheck openvswitch - +# install 2.8.2 for queens. +# 2.9.0 is the current version in openstack-queens, but it is buggy. +# Remove this when https://review.rdoproject.org/r/#/c/13839/ merges and 2.9.2 is in the repo. +yum repolist +yum --showduplicates list openvswitch +if [ "${branch}" == "stable/queens" ]; then + yum install -y --nogpgcheck openvswitch-2.8.2-1.el7 +else + yum install -y --nogpgcheck openvswitch +fi cd "$OLDPWD" rm -fr tmp