ansible venv --system-site-packages causes conflicts

Bug #1657890 reported by Pas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Low
Praveen N

Bug Description

On ubuntu 16.10 yakkety (and probably on 16.04 xenial, where python-cffi-backend is 1.5.2) and using current master ( 42aaff7c5351e2520fcf5efc373041757519682a ) bootstrap installs python-cffi-backend distrib package, but then tries to install python package cryptography which somehow depends on python-cffi 1.9.

And then things inside the venv find the cffi from outside and produce an AssertionError version mismatch.

Editing ./scripts/bootstrap-ansible.sh works around this.

Praveen N (praveenn)
Changed in openstack-ansible:
assignee: nobody → Praveen N (praveenn)
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Could you provide the code in question by a patch or here?

Avoiding duplication of work seems smarter :)

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Pas (pasthelod) wrote :

Hello!

Sure, here's a diff for my bootstrap-ansible.sh:

diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh
index caa74c7..b525dbf 100755
--- a/scripts/bootstrap-ansible.sh
+++ b/scripts/bootstrap-ansible.sh
@@ -96,7 +96,7 @@ fi

 # Create a Virtualenv for the Ansible runtime
 PYTHON_EXEC_PATH="$(which python2 || which python)"
-virtualenv --clear ${VIRTUALENV_OPTIONS} --system-site-packages --python="${PYTHON_EXEC_PATH}" /opt/ansible-runtime
+virtualenv --clear ${VIRTUALENV_OPTIONS} --python="${PYTHON_EXEC_PATH}" /opt/ansible-runtime

 # The vars used to prepare the Ansible runtime venv
 PIP_OPTS+=" --upgrade"

Revision history for this message
Jonathan Rosser (jrosser) wrote :
Changed in openstack-ansible:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.