Fix cinderlib-lvm-functional

In change-id I867c972d9f712c0df4260ebc8211b786006ed7a2 the os-brick
library added a new binary dependency, lsscsi, and now the cinderlib lvm
functional tests and tempest with lvm are failing because they cannot
find the package.

The reason why the CI didn't fail on the patch is because devstack
installs the bindeps of the projects installed from source, but Zuul
doesn't do the same for the "required-projects".

To solve this issue an prevent future gate breaks this patch uses the
bindep zuul role to install os-brick missing packages before running any
of its functional jobs.

For the tempest lvm job we install os-brick from source, which makes
devstack automatically install bindeps from the project.

Change-Id: Ieb4e94850a1705a5d2b36a9a963646f10250e811
This commit is contained in:
Gorka Eguileor 2020-08-04 12:59:41 +02:00
parent 6522756115
commit 6ad3c4a19c
3 changed files with 40 additions and 12 deletions

View File

@ -11,7 +11,7 @@
- cinderlib-lvm-functional
- cinderlib-ceph-functional
- cinder-tempest-plugin-lvm-lio-barbican
- os-brick-src-tempest-lvm-lio-barbican
gate:
queue: integrated
jobs:
@ -21,7 +21,7 @@
- cinderlib-lvm-functional
- cinderlib-ceph-functional
- cinder-tempest-plugin-lvm-lio-barbican
- os-brick-src-tempest-lvm-lio-barbican
post:
jobs:
- publish-openstack-python-branch-tarball
@ -41,11 +41,19 @@
- openstack/cinder
- job:
name: cinderlib-lvm-functional
name: cinderlib-functional
parent: openstack-tox-functional-with-sudo
required-projects:
- openstack/os-brick
- openstack/cinder
pre-run: playbooks/required-projects-bindeps.yaml
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
- job:
name: cinderlib-lvm-functional
parent: cinderlib-functional
pre-run: playbooks/setup-lvm.yaml
nodeset: centos-8
vars:
@ -57,18 +65,11 @@
NOSE_WITH_HTML_OUTPUT: 1
NOSE_HTML_OUT_FILE: nose_results.html
NOSE_WITH_XUNIT: 1
irrelevant-files: &documentation-files
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
# The Ceph job tests cinderlib without unnecessary libraries
- job:
name: cinderlib-ceph-functional
parent: openstack-tox-functional-with-sudo
required-projects:
- openstack/os-brick
- openstack/cinder
parent: cinderlib-functional
pre-run: playbooks/setup-ceph.yaml
# TODO: move back to centos-8 as soon as Ceph packages are available
nodeset: ubuntu-bionic
@ -80,4 +81,3 @@
NOSE_WITH_HTML_OUTPUT: 1
NOSE_HTML_OUT_FILE: nose_results.html
NOSE_WITH_XUNIT: 1
irrelevant-files: *documentation-files

View File

@ -0,0 +1,27 @@
# Copyright (c) 2020, Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
#
---
#------------------------------------------------------------------------------
# Install OS-Brick bindeps for jobs that use them in required-projects.
# We don't install Cinder bindeps because for now we don't need them, as they
# include things like mariadb, postgresql, and mysql-server.
#------------------------------------------------------------------------------
- hosts: all
roles:
- role: bindep
vars:
bindep_dir: "{{ zuul.projects['opendev.org/openstack/os-brick'].src_dir }}"

View File

@ -19,6 +19,7 @@ install_command = pip install {env:PIP_OPTIONS:} {opts} {packages}
# overwrite the package installed by Zuul on jobs supporting cross-project
# dependencies (include Cinder in required-projects). This allows us to also
# run local tests against master.
# NOTE: Functional tests may fail if host is missing bindeps from deps projects
deps= -r{toxinidir}/test-requirements.txt
git+https://opendev.org/openstack/os-brick#egg=os-brick
git+https://opendev.org/openstack/cinder#egg=cinder