From b1ddfda621f7504246119b3560eb01df9664bbc2 Mon Sep 17 00:00:00 2001 From: David Vallee Delisle Date: Tue, 9 Feb 2021 18:26:43 -0500 Subject: [PATCH] Fix molecule jobs after release of cryptography3.4 Molecule jobs[0] fails with below error:- ModuleNotFoundError: No module named 'setuptools_rust' This error appeared following the release of cryptography 3.4, which now includes Rust code. It can be installed without Rust using a Python wheel, but only with more recent pip than version 9.0.3 available as RPM on CentOS 8. The cryptography bug report [1] recommends pip>=19.1.1. [0] https://e99635be2c7386b5beda-3dea60a35fb0d38e41c535f13b48e895.ssl.cf1.rackcdn.com/773531/1/gate/tripleo-ansible-centos-8-molecule-tripleo_network_config/b1284cd/job-output.txt [1] https://github.com/pyca/cryptography/issues/5753 Related-Bug: #1915101 Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/774814 Change-Id: Ib5baad39dd7e43dff9046178c00b0f836dc18bae (cherry picked from commit 0bf795117387177921b86f1e283fc16c204d96bf) (cherry picked from commit 90b47a4609e480094378e7e06a84a362f05c21e2) --- scripts/run-local-test | 2 +- zuul.d/playbooks/pre.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/run-local-test b/scripts/run-local-test index 6f7a49d5f..aa03e85c9 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -44,7 +44,7 @@ esac "${PYTHON_EXEC}" -m virtualenv --system-site-packages "${HOME}/test-python" # Run bindep -"${HOME}/test-python/bin/pip" install pip setuptools bindep --upgrade +"${HOME}/test-python/bin/pip" install "pip>=19.1.1" setuptools bindep --upgrade "${PROJECT_DIR}/scripts/bindep-install" # Install local requirements diff --git a/zuul.d/playbooks/pre.yml b/zuul.d/playbooks/pre.yml index 92c21c72a..41bf17793 100644 --- a/zuul.d/playbooks/pre.yml +++ b/zuul.d/playbooks/pre.yml @@ -23,6 +23,12 @@ become: true changed_when: false + - name: Ensure a recent version of pip is installed in virtualenv + pip: + name: "pip>=19.1.1" + virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_command: "{{ ensure_pip_virtualenv_command }}" + - name: Setup test-python pip: requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt"