From 5601d336ca556c82891466c89cadef0676df576c Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Tue, 7 Nov 2017 14:45:05 -0500 Subject: [PATCH] Add .zuul.yaml with LIO job This replaces the legacy-tempest-dsvm-full-lio job. Skip tests that are currently failing. Change-Id: Ief6ff0771488417fc80a3ffe7505a0d478ec5eb6 --- .gitignore | 1 + .zuul.yaml | 33 +++++++++ .../tests/tempest/config/lio/tempest-conf.sh | 30 -------- .../cinder-tempest-dsvm-lvm-lio/post.yaml | 15 ++++ .../cinder-tempest-dsvm-lvm-lio/run.yaml | 73 +++++++++++++++++++ 5 files changed, 122 insertions(+), 30 deletions(-) create mode 100644 .zuul.yaml delete mode 100644 cinder/tests/tempest/config/lio/tempest-conf.sh create mode 100644 playbooks/legacy/cinder-tempest-dsvm-lvm-lio/post.yaml create mode 100644 playbooks/legacy/cinder-tempest-dsvm-lvm-lio/run.yaml diff --git a/.gitignore b/.gitignore index 9ae3c24b019..0bd431f86a3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ !.gitignore !.mailmap !.testr.conf +!.zuul.yaml .*.sw? AUTHORS Authors diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 00000000000..90c5e4276d0 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,33 @@ +- project: + name: openstack/cinder + check: + jobs: + - cinder-tempest-dsvm-lvm-lio: + voting: false + branches: ^(?!driverfixes/).*$ + irrelevant-files: + - ^.*\.rst$ + - ^api-ref/.*$ + - ^cinder/hacking/.*$ + - ^cinder/locale/.*$ + - ^cinder/tests/functional.*$ + - ^cinder/tests/unit.*$ + - ^contrib/block-box.*$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^setup.cfg$ + - ^tools/.*$ + +- job: + # Previously named legacy-tempest-dsvm-full-lio + name: cinder-tempest-dsvm-lvm-lio + parent: legacy-dsvm-base + run: playbooks/legacy/cinder-tempest-dsvm-lvm-lio/run.yaml + post-run: playbooks/legacy/cinder-tempest-dsvm-lvm-lio/post.yaml + timeout: 10800 + required-projects: + - openstack-infra/devstack-gate + - openstack/barbican + - openstack/python-barbicanclient + - openstack/tempest + - openstack/os-brick diff --git a/cinder/tests/tempest/config/lio/tempest-conf.sh b/cinder/tests/tempest/config/lio/tempest-conf.sh deleted file mode 100644 index edec3630b23..00000000000 --- a/cinder/tests/tempest/config/lio/tempest-conf.sh +++ /dev/null @@ -1,30 +0,0 @@ -# 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. - -# This script is executed in the OpenStack CI -# *tempest-dsvm-full-lio job. It's used to configure which -# tempest tests actually get run. You can find the CI job configuration here: -# -# http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/devstack-gate.yaml -# -# NOTE(sdague): tempest (because of testr) only supports and additive -# regex for specifying test selection. As such this is a series of -# negative assertions ?: for strings. -# -# Being a regex, an unescaped '.' matches any character, so those -# should be escaped. There is no need to specify .* at the end of a -# pattern, as it's handled by the final match. - -# Test idempotent ids are used for specific tests because -# these are unchanged if the test name changes. - -export DEVSTACK_GATE_TEMPEST_REGEX='(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)|(^cinder\.tests.tempest))' diff --git a/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/post.yaml b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/post.yaml new file mode 100644 index 00000000000..e07f5510ae7 --- /dev/null +++ b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/post.yaml @@ -0,0 +1,15 @@ +- hosts: primary + tasks: + + - name: Copy files from {{ ansible_user_dir }}/workspace/ on node + synchronize: + src: '{{ ansible_user_dir }}/workspace/' + dest: '{{ zuul.executor.log_root }}' + mode: pull + copy_links: true + verify_host: true + rsync_opts: + - --include=/logs/** + - --include=*/ + - --exclude=* + - --prune-empty-dirs diff --git a/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/run.yaml b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/run.yaml new file mode 100644 index 00000000000..fe0b1cbb7aa --- /dev/null +++ b/playbooks/legacy/cinder-tempest-dsvm-lvm-lio/run.yaml @@ -0,0 +1,73 @@ +- hosts: all + name: Test the LVM driver with the LIO iSCSI target and Barbican + tasks: + + - name: Ensure legacy workspace directory + file: + path: '{{ ansible_user_dir }}/workspace' + state: directory + + - shell: + cmd: | + set -e + set -x + cat > clonemap.yaml << EOF + clonemap: + - name: openstack-infra/devstack-gate + dest: devstack-gate + EOF + /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ + git://git.openstack.org \ + openstack-infra/devstack-gate + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + cat << 'EOF' >>"/tmp/dg-local.conf" + [[local|localrc]] + CINDER_ISCSI_HELPER=lioadm + CINDER_LVM_TYPE=thin + enable_service barbican + enable_plugin barbican git://git.openstack.org/openstack/barbican + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PROJECTS="openstack/barbican $PROJECTS" + export PROJECTS="openstack/python-barbicanclient $PROJECTS" + export PYTHONUNBUFFERED=true + export DEVSTACK_GATE_TEMPEST=1 + export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1 + # As we are setting DEVSTACK_GATE_TEMPEST_ALL_PLUGINS, we need to add + # the regex to limit the tests to the same as a tempest -efull would + # run. + DEVSTACK_GATE_TEMPEST_REGEX='(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)|(^cinder\.tests.tempest))' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesSnapshotTestJSON.test_snapshot_backup)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_backup_create_attached_volume)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_backup_create_and_restore_to_an_existing_volume)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_bootable_volume_backup_and_restore)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_incremental_backup)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_volume_backup_create_get_detailed_list_restore_delete)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsTest.test_volume_snapshot_backup)' + DEVSTACK_GATE_TEMPEST_REGEX+='(?!.*VolumesBackupsV39Test.test_update_backup)' + export DEVSTACK_GATE_TEMPEST_REGEX + export BRANCH_OVERRIDE=default + if [ "$BRANCH_OVERRIDE" != "default" ] ; then + export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE + fi + + cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh + ./safe-devstack-vm-gate-wrap.sh + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}'