From ff7621c0d2c1e813053186170c0b70c0f8caca1f Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 3 Jan 2019 14:48:12 +0000 Subject: [PATCH] Use a virtualenv in openSUSE CI testing Currently all of the opensuse 150 jobs are failing due to being unable to install virtualbmc via pip. The failure signature is: Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. The usual solution to this problem is to install Python packages in a virtual environment. This change modifies the zuul CI jobs to use a virtual environment for all openSUSE jobs. Change-Id: I2840ec32cffcaf5d7f32a91907d51c1a500f19f1 --- playbooks/legacy/bifrost-integration-dhcp/run.yaml | 1 + .../bifrost-integration-dibipa-debian/run.yaml | 1 + .../legacy/bifrost-integration-tinyipa/run.yaml | 1 + scripts/test-bifrost.sh | 2 +- zuul.d/legacy-bifrost-jobs.yaml | 12 ++++++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/playbooks/legacy/bifrost-integration-dhcp/run.yaml b/playbooks/legacy/bifrost-integration-dhcp/run.yaml index c3cd28efe..2562e424c 100644 --- a/playbooks/legacy/bifrost-integration-dhcp/run.yaml +++ b/playbooks/legacy/bifrost-integration-dhcp/run.yaml @@ -66,6 +66,7 @@ openstack/requirements export GIT_BASE=$(pwd) export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt + export USE_VENV={{ use_venv | default(false) | bool | lower }} cd openstack/bifrost scripts/test-bifrost-inventory-dhcp.sh executable: /bin/bash diff --git a/playbooks/legacy/bifrost-integration-dibipa-debian/run.yaml b/playbooks/legacy/bifrost-integration-dibipa-debian/run.yaml index 9dcc6271b..e7906d080 100644 --- a/playbooks/legacy/bifrost-integration-dibipa-debian/run.yaml +++ b/playbooks/legacy/bifrost-integration-dibipa-debian/run.yaml @@ -66,6 +66,7 @@ openstack/requirements export GIT_BASE=$(pwd) export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt + export USE_VENV={{ use_venv | default(false) | bool | lower }} cd openstack/bifrost scripts/test-bifrost-build-images.sh executable: /bin/bash diff --git a/playbooks/legacy/bifrost-integration-tinyipa/run.yaml b/playbooks/legacy/bifrost-integration-tinyipa/run.yaml index c33439d30..bc710780d 100644 --- a/playbooks/legacy/bifrost-integration-tinyipa/run.yaml +++ b/playbooks/legacy/bifrost-integration-tinyipa/run.yaml @@ -75,6 +75,7 @@ openstack/requirements export GIT_BASE=$(pwd) export UPPER_CONSTRAINTS_FILE=$WORKSPACE/upper-constraints.txt + export USE_VENV={{ use_venv | default(false) | bool | lower }} cd openstack/bifrost "{{ script_name }}" executable: /bin/bash diff --git a/scripts/test-bifrost.sh b/scripts/test-bifrost.sh index 0063e5807..f3d174c6d 100755 --- a/scripts/test-bifrost.sh +++ b/scripts/test-bifrost.sh @@ -8,7 +8,7 @@ BIFROST_HOME=$SCRIPT_HOME/.. ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack} ENABLE_VENV="false" USE_DHCP="false" -USE_VENV="false" +USE_VENV="${USE_VENV:-false}" BUILD_IMAGE="false" BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'} diff --git a/zuul.d/legacy-bifrost-jobs.yaml b/zuul.d/legacy-bifrost-jobs.yaml index 81b20627a..c5e045532 100644 --- a/zuul.d/legacy-bifrost-jobs.yaml +++ b/zuul.d/legacy-bifrost-jobs.yaml @@ -48,11 +48,15 @@ name: bifrost-integration-dhcp-opensuse-423 parent: bifrost-integration-dhcp nodeset: opensuse-423 + vars: + use_venv: true - job: name: bifrost-integration-dhcp-opensuse-150 parent: bifrost-integration-dhcp nodeset: opensuse-150 + vars: + use_venv: true - job: name: bifrost-integration-dibipa-debian @@ -75,11 +79,15 @@ name: bifrost-integration-dibipa-debian-opensuse-423 parent: bifrost-integration-dibipa-debian nodeset: opensuse-423 + vars: + use_venv: true - job: name: bifrost-integration-dibipa-debian-opensuse-150 parent: bifrost-integration-dibipa-debian nodeset: opensuse-150 + vars: + use_venv: true - job: name: bifrost-integration-tinyipa @@ -109,8 +117,12 @@ name: bifrost-integration-tinyipa-opensuse-423 parent: bifrost-integration-tinyipa nodeset: opensuse-423 + vars: + use_venv: true - job: name: bifrost-integration-tinyipa-opensuse-150 parent: bifrost-integration-tinyipa nodeset: opensuse-150 + vars: + use_venv: true