Migrate dvr multinode scenario to zuulv3 syntax
Job neutron-tempest-plugin-dvr-multinode-scenario was the
last job in neutron-tempest-plugin repo defined using
legacy zuulv2 templates.
This commit migrates it to zuulv3 syntax.
It also adds new ansible role "multi-node-setup" which
which creates patch ports between Neutron's external
bridge (br-ex) and infra bridge (br-infra). That is necessary
to provide connectivity to floating IPs, which may be
configured on subnode when dvr is used, from each node.
This patch introduces also new playbook
"dvr-multinode-scenario-pre-run" which is used to be run in
neutron-tempest-plugin-dvr-multinode-scenario job and which
uses "multi-node-setup" role to create those patch ports
on each host used in job.
Change-Id: Ic5bb7649ebb8bf229459f3d9911f64635cbf1e44
diff --git a/playbooks/dvr-multinode-scenario-pre-run.yaml b/playbooks/dvr-multinode-scenario-pre-run.yaml
new file mode 100644
index 0000000..8afd8a5
--- /dev/null
+++ b/playbooks/dvr-multinode-scenario-pre-run.yaml
@@ -0,0 +1,3 @@
+- hosts: all
+ roles:
+ - multi-node-setup
diff --git a/playbooks/neutron-tempest-plugin-dvr-multinode-scenario/post.yaml b/playbooks/neutron-tempest-plugin-dvr-multinode-scenario/post.yaml
deleted file mode 100644
index e07f551..0000000
--- a/playbooks/neutron-tempest-plugin-dvr-multinode-scenario/post.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-- 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/neutron-tempest-plugin-dvr-multinode-scenario/run.yaml b/playbooks/neutron-tempest-plugin-dvr-multinode-scenario/run.yaml
deleted file mode 100644
index a9ce3e0..0000000
--- a/playbooks/neutron-tempest-plugin-dvr-multinode-scenario/run.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-- hosts: primary
- name: neutron-tempest-plugin-dvr-multinode-scenario
- 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
- export PYTHONUNBUFFERED=true
- export DEVSTACK_GATE_TEMPEST=1
- export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
- export DEVSTACK_GATE_NEUTRON=1
- export DEVSTACK_GATE_CONFIGDRIVE=0
- export DEVSTACK_GATE_TEMPEST_REGEX="(neutron_tempest_plugin.scenario)"
- export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-tempest-plugin git://git.openstack.org/openstack/neutron-tempest-plugin"
- # Test DVR works multinode
- export DEVSTACK_GATE_NEUTRON_DVR=1
- export BRANCH_OVERRIDE=default
- if [ "$BRANCH_OVERRIDE" != "default" ] ; then
- export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
- fi
- export DEVSTACK_GATE_TOPOLOGY="multinode"
- export PROJECTS="openstack/neutron-tempest-plugin $PROJECTS"
-
- function gate_hook {
- bash -xe $BASE/new/neutron/neutron/tests/contrib/gate_hook.sh dsvm-scenario-ovs
- }
- export -f gate_hook
-
- function post_test_hook {
- bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-scenario-ovs
- }
- export -f post_test_hook
-
- 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 }}'