From e79314ecd462f1388d72bada681cc792a588d8db Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 3 Jul 2018 18:10:15 +0100 Subject: [PATCH] Pin get-pip.py to 3.2 As get-pip.py evolves based on pip 10, while we're still using pip 9, changes in the way it can be used are causing problems. For example, the ability to use --download is no longer there. As such, let's pin to a known good version and leave it at that until we no longer need to use this script. Version 3.2 maps to pip 7.1.2 which fulfills our needs. Change-Id: I2a49a407e82c23540cd0aff209bd276c8a303bf0 Closes-Bug: 1779534 --- inventory/group_vars/all/pip.yml | 2 +- playbooks/common-tasks/set-pip-vars.yml | 2 +- scripts/scripts-library.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/inventory/group_vars/all/pip.yml b/inventory/group_vars/all/pip.yml index 54332aa0cf..c3be463177 100644 --- a/inventory/group_vars/all/pip.yml +++ b/inventory/group_vars/all/pip.yml @@ -24,7 +24,7 @@ pip_install_upper_constraints: "{{ repo_release_path }}/requirements_absolute_re pip_offline_install: false # The URL to retrieve the get-pip.py installation script -pip_upstream_url: "{{ (pip_offline_install | bool) | ternary('https://bootstrap.pypa.io/get-pip.py', repo_release_path ~ '/get-pip.py') }}" +pip_upstream_url: "{{ (pip_offline_install | bool) | ternary('https://bootstrap.pypa.io/3.2/get-pip.py', repo_release_path ~ '/get-pip.py') }}" # The URL to the repo server's pypi reverse proxy simple index pip_default_index: "{{ openstack_repo_url }}/simple" diff --git a/playbooks/common-tasks/set-pip-vars.yml b/playbooks/common-tasks/set-pip-vars.yml index ff0b3dcf1e..6584c54825 100644 --- a/playbooks/common-tasks/set-pip-vars.yml +++ b/playbooks/common-tasks/set-pip-vars.yml @@ -87,7 +87,7 @@ - name: Set pip upstream URL set_fact: pip_upstream_url: >- - {{ ((_repo_data_check.status | default(503)) != 200) | ternary('https://bootstrap.pypa.io/get-pip.py', __pip_upstream_url) }} + {{ ((_repo_data_check.status | default(503)) != 200) | ternary('https://bootstrap.pypa.io/3.2/get-pip.py', __pip_upstream_url) }} tags: - common-pip diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index cbed4da8f2..864bf4fbbd 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -378,8 +378,8 @@ function get_pip { ${GETPIP_CMD} ${GET_PIP_URL} > ${GETPIP_FILE} else # Otherwise, try the two standard URL's - ${GETPIP_CMD} https://bootstrap.pypa.io/get-pip.py > ${GETPIP_FILE}\ - || ${GETPIP_CMD} https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py > ${GETPIP_FILE} + ${GETPIP_CMD} https://bootstrap.pypa.io/3.2/get-pip.py > ${GETPIP_FILE}\ + || ${GETPIP_CMD} https://raw.githubusercontent.com/pypa/get-pip/master/3.2/get-pip.py > ${GETPIP_FILE} fi ${GETPIP_PYTHON_EXEC_PATH} ${GETPIP_FILE} ${PIP_OPTS} \