From 3db82fd5517f90b3a39d28bfb62910d3a4ea34c3 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 11 Mar 2020 10:50:24 +0000 Subject: [PATCH] Pin virtualbmc to <2 when using Python 2 This is necessary until we drop support for CentOS 7. Also use Train upper constraints with Python 2, since Train is the last release to support Python 2. Change-Id: I085d107ae2d338a7609dececb7b62555937b7b1e --- ansible/group_vars/all | 2 +- .../roles/virtualbmc-daemon/files/requirements.txt | 4 ---- ansible/roles/virtualbmc-daemon/tasks/main.yml | 13 ++----------- zuul.d/jobs.yaml | 3 +++ zuul.d/project.yaml | 6 ++++-- 5 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 ansible/roles/virtualbmc-daemon/files/requirements.txt diff --git a/ansible/group_vars/all b/ansible/group_vars/all index d0c25e8..9e971c6 100644 --- a/ansible/group_vars/all +++ b/ansible/group_vars/all @@ -6,4 +6,4 @@ virtualenv_path: "{{ '/'.join([ansible_env['HOME'], 'tenks-venv']) }}" # The URL of the upper constraints file to pass to pip when installing Python # packages. python_upper_constraints_url: >- - https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt + https://releases.openstack.org/constraints/upper/{% if ansible_python.version.major == 2 %}train{% else %}master{% endif %} diff --git a/ansible/roles/virtualbmc-daemon/files/requirements.txt b/ansible/roles/virtualbmc-daemon/files/requirements.txt deleted file mode 100644 index c98877e..0000000 --- a/ansible/roles/virtualbmc-daemon/files/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -# This file contains the Python packages that are needed in the Tenks virtual -# env. - -virtualbmc>=1.4.0 # Apache diff --git a/ansible/roles/virtualbmc-daemon/tasks/main.yml b/ansible/roles/virtualbmc-daemon/tasks/main.yml index 619ce34..b3b07e6 100644 --- a/ansible/roles/virtualbmc-daemon/tasks/main.yml +++ b/ansible/roles/virtualbmc-daemon/tasks/main.yml @@ -18,19 +18,10 @@ retries: 3 become: true -# This is useful to get a uniquely generated temporary path. -- name: Create temporary file for pip requirements - tempfile: - register: req_file - -- name: Copy requirements file to temporary location - copy: - src: requirements.txt - dest: "{{ req_file.path }}" - - name: Ensure Python requirements are installed pip: - requirements: "{{ req_file.path }}" + name: + - "virtualbmc>=1.4.0{% if ansible_python.version.major == 2 %},<2{% endif %}" extra_args: >- -c {{ vbmcd_python_upper_constraints_url }} virtualenv: "{{ vbmcd_virtualenv_path or omit }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 61c582e..32f45c3 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -11,6 +11,9 @@ name: tenks-deploy-teardown-centos parent: tenks-deploy-teardown-base nodeset: centos-7 + required-projects: + - name: openstack/requirements + override-checkout: stable/train - job: name: tenks-deploy-teardown-ubuntu diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 3a2a438..915a4c4 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -13,7 +13,8 @@ - tenks-deploy-teardown-ubuntu # Until we have ironic jobs using tenks, gate on the kayobe overcloud # deploy job, which uses tenks to test bare metal compute provisioning. - - kayobe-overcloud-centos + # FIXME(mgoddard): Kayobe CentOS 7 jobs no longer working. Replace with C8. + # - kayobe-overcloud-centos gate: queue: tenks jobs: @@ -22,4 +23,5 @@ - tenks-deploy-teardown-ubuntu # Until we have ironic jobs using tenks, gate on the kayobe overcloud # deploy job, which uses tenks to test bare metal compute provisioning. - - kayobe-overcloud-centos + # FIXME(mgoddard): Kayobe CentOS 7 jobs no longer working. Replace with C8. + # - kayobe-overcloud-centos