From 862c6fb794f918bd22835a1d9c492cd97e1f5091 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Wed, 10 Jan 2018 18:22:00 -0500 Subject: [PATCH] Add the nova-multiattach job This change adds a new voting check/gate queue job for running volume multiattach compute API tests. This configures devstack to enable tempest for volume multiattach support and disables the Pike UCA since we need qemu<2.10 for libvirt to work with multiattach volumes. Depends on the following devstack patch to add the ENABLE_VOLUME_MULTIATTACH variable. The devstack patch depends on the tempest patch that adds the volume multiattach tests and the tempest patch depends on the series of nova changes that add volume multiattach support. Depends-On: I46b7eabf6a28f230666f6933a087f73cb4408348 Depends on the following nova patch to fix a bug when creating a server snapshot of a paused instance when not using the Pike UCA: Depends-On: If6c4dd6890ad6e2d00b186c6a9aa85f507b354e0 Depends on the tip of the series of Tempest tests which include additional tests for resize with a multiattach volume and swap volume with a multiattach volume. Depends-On: I751e9e4237e2997e102dd13c4f060deaea73d543 Part of blueprint multi-attach-volume Change-Id: I51adbbdf13711e463b4d25c2ffd4a3123cd65675 --- .zuul.yaml | 42 ++++++++++++--- playbooks/legacy/nova-multiattach/post.yaml | 15 ++++++ playbooks/legacy/nova-multiattach/run.yaml | 58 +++++++++++++++++++++ 3 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 playbooks/legacy/nova-multiattach/post.yaml create mode 100644 playbooks/legacy/nova-multiattach/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 296f98330322..5a4b4210aee3 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,12 +1,11 @@ +# See https://docs.openstack.org/infra/manual/drivers.html#naming-with-zuul-v3 +# for job naming conventions. - job: - name: nova-lvm + name: nova-base parent: legacy-dsvm-base description: | - Run standard integration tests using LVM image backend. This is useful if - there are tests touching this code. + The base job definition for nova jobs. Contains common configuration. timeout: 10800 - run: playbooks/legacy/nova-lvm/run.yaml - post-run: playbooks/legacy/nova-lvm/post.yaml required-projects: - openstack-infra/devstack-gate - openstack/nova @@ -60,16 +59,43 @@ vars: tox_envlist: functional-py35 +- job: + name: nova-lvm + parent: nova-base + description: | + Run standard integration tests using LVM image backend. This is useful if + there are tests touching this code. + run: playbooks/legacy/nova-lvm/run.yaml + post-run: playbooks/legacy/nova-lvm/post.yaml + +- job: + name: nova-multiattach + parent: nova-base + description: | + Run tempest integration tests with volume multiattach support enabled. + This job will only work starting with Queens. + It uses the default Cinder volume type in devstack (lvm) and the + default compute driver in devstack (libvirt). It also disables the + Pike Ubuntu Cloud Archive because volume multiattach support with + the libvirt driver only works with qemu<2.10 or libvirt>=3.10 which + won't work with the Pike UCA. + branches: ^(?!stable/(newton|ocata|pike)).*$ + run: playbooks/legacy/nova-multiattach/run.yaml + post-run: playbooks/legacy/nova-multiattach/post.yaml + - project: name: openstack/nova - experimental: - jobs: - - nova-lvm check: jobs: + - nova-multiattach - nova-tox-functional - nova-tox-functional-py35 gate: jobs: + - nova-multiattach - nova-tox-functional - nova-tox-functional-py35 + experimental: + jobs: + # Please try to keep this list of job names sorted alphabetically. + - nova-lvm diff --git a/playbooks/legacy/nova-multiattach/post.yaml b/playbooks/legacy/nova-multiattach/post.yaml new file mode 100644 index 000000000000..e07f5510ae70 --- /dev/null +++ b/playbooks/legacy/nova-multiattach/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/nova-multiattach/run.yaml b/playbooks/legacy/nova-multiattach/run.yaml new file mode 100644 index 000000000000..66131722e3cf --- /dev/null +++ b/playbooks/legacy/nova-multiattach/run.yaml @@ -0,0 +1,58 @@ +- hosts: all + name: nova-multiattach + tasks: + + - name: Ensure 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]] + ENABLE_VOLUME_MULTIATTACH=True + ENABLE_UBUNTU_CLOUD_ARCHIVE=False + + EOF + executable: /bin/bash + chdir: '{{ ansible_user_dir }}/workspace' + environment: '{{ zuul | zuul_legacy_vars }}' + + - shell: + cmd: | + set -e + set -x + export PYTHONUNBUFFERED=true + # Yes we want to run Tempest. + export DEVSTACK_GATE_TEMPEST=1 + # Only run compute API tests; note that this will need to + # be updated if multiattach scenario tests are ever added. + export DEVSTACK_GATE_TEMPEST_REGEX="api.compute" + 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 }}'