Fix installation errors with Python 2
Python 2 jobs recently started failing frequently with the following error: distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr>=2.0') The root cause appears to be that indirect requirements are handled by easy_install which doesn't like some index servers [1]. Install the latest setuptools first to work around the issue. Disable upgrade jobs since the same issue is affecting Kayobe installation in the previous release (Rocky). [1] https://github.com/googleapis/google-cloud-python/issues/3757#issuecomment-422384453 Change-Id: I1b86c5f58d0c3b63269766eaa8e76af18b5fadb1
This commit is contained in:
parent
9bf903666e
commit
125d399bda
|
@ -43,13 +43,14 @@
|
|||
become: True
|
||||
when: kolla_ansible_venv is not none
|
||||
|
||||
- name: Ensure the latest version of pip is installed
|
||||
- name: Ensure the latest versions of pip and setuptools are installed
|
||||
pip:
|
||||
name: "{{ item.name }}"
|
||||
state: latest
|
||||
virtualenv: "{{ kolla_ansible_venv }}"
|
||||
with_items:
|
||||
- { name: pip }
|
||||
- { name: setuptools }
|
||||
|
||||
- name: Ensure python requirements file exists
|
||||
template:
|
||||
|
|
|
@ -46,13 +46,14 @@
|
|||
become: True
|
||||
when: kolla_venv is not none
|
||||
|
||||
- name: Ensure the latest version of pip is installed
|
||||
- name: Ensure the latest versions of pip and setuptools are installed
|
||||
pip:
|
||||
name: "{{ item.name }}"
|
||||
state: latest
|
||||
virtualenv: "{{ kolla_venv }}"
|
||||
with_items:
|
||||
- { name: pip }
|
||||
- { name: setuptools }
|
||||
|
||||
- name: Ensure Python package docker-py is absent
|
||||
# In version 2.0.0, docker renamed the docker-py python package to docker.
|
||||
|
|
|
@ -124,6 +124,9 @@ function install_venv {
|
|||
set +u
|
||||
source "${venv_path}/bin/activate"
|
||||
pip install -U pip
|
||||
# Update setuptools as workaround for distutils.errors.DistutilsError:
|
||||
# Could not find suitable distribution for Requirement.parse('pbr')
|
||||
pip install -U setuptools
|
||||
pip install $pip_paths
|
||||
deactivate
|
||||
set -u
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
- kayobe-tox-molecule
|
||||
- kayobe-overcloud-centos
|
||||
- kayobe-seed-centos
|
||||
- kayobe-seed-upgrade-centos
|
||||
|
||||
gate:
|
||||
queue: kayobe
|
||||
|
@ -24,4 +23,3 @@
|
|||
- kayobe-tox-molecule
|
||||
- kayobe-overcloud-centos
|
||||
- kayobe-seed-centos
|
||||
- kayobe-seed-upgrade-centos
|
||||
|
|
Loading…
Reference in New Issue