From a4fa7aee4366239560658c8f4b3846445fea6bd9 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 (cherry picked from commit e79314ecd462f1388d72bada681cc792a588d8db) --- inventory/group_vars/all/pip.yml | 2 +- playbooks/common-tasks/set-pip-upstream-url.yml | 6 +++--- scripts/scripts-library.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/inventory/group_vars/all/pip.yml b/inventory/group_vars/all/pip.yml index ca64588cba..b940bb8af6 100644 --- a/inventory/group_vars/all/pip.yml +++ b/inventory/group_vars/all/pip.yml @@ -27,7 +27,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-upstream-url.yml b/playbooks/common-tasks/set-pip-upstream-url.yml index dcb68d02e2..dab3c888d3 100644 --- a/playbooks/common-tasks/set-pip-upstream-url.yml +++ b/playbooks/common-tasks/set-pip-upstream-url.yml @@ -24,7 +24,7 @@ timeout: 3 register: _repo_data_check failed_when: false - when: pip_upstream_url != "https://bootstrap.pypa.io/get-pip.py" + when: pip_upstream_url != "https://bootstrap.pypa.io/3.2/get-pip.py" tags: - common-pip @@ -32,9 +32,9 @@ # pip isn't locked to it. - name: Set pip upstream URL set_fact: - pip_upstream_url: "https://bootstrap.pypa.io/get-pip.py" + pip_upstream_url: "https://bootstrap.pypa.io/3.2/get-pip.py" when: - - pip_upstream_url != "https://bootstrap.pypa.io/get-pip.py" + - pip_upstream_url != "https://bootstrap.pypa.io/3.2/get-pip.py" - (_repo_data_check.status | default(503)) != 200 tags: - common-pip diff --git a/scripts/scripts-library.sh b/scripts/scripts-library.sh index 40a8000cbd..9030c905ad 100755 --- a/scripts/scripts-library.sh +++ b/scripts/scripts-library.sh @@ -337,8 +337,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} \