diff --git a/playbooks/multinode-devstack-pre-run.yaml b/playbooks/multinode-devstack-pre-run.yaml deleted file mode 100644 index 8afd8a5a4..000000000 --- a/playbooks/multinode-devstack-pre-run.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- hosts: all - roles: - - multi-node-setup diff --git a/playbooks/post-tobiko-devstack.yaml b/playbooks/tobiko-devstack-post-run.yaml similarity index 100% rename from playbooks/post-tobiko-devstack.yaml rename to playbooks/tobiko-devstack-post-run.yaml diff --git a/playbooks/pre-tobiko-devstack.yaml b/playbooks/tobiko-devstack-pre-run.yaml similarity index 91% rename from playbooks/pre-tobiko-devstack.yaml rename to playbooks/tobiko-devstack-pre-run.yaml index 10d1a312a..647dfe68c 100644 --- a/playbooks/pre-tobiko-devstack.yaml +++ b/playbooks/tobiko-devstack-pre-run.yaml @@ -40,3 +40,13 @@ roles: - role: copy-build-sshkey copy_sshkey_target_user: stack + + +- hosts: all + roles: + - multi-node-setup + + +- hosts: all + roles: + - orchestrate-devstack diff --git a/playbooks/tobiko-devstack.yaml b/playbooks/tobiko-devstack-run.yaml similarity index 72% rename from playbooks/tobiko-devstack.yaml rename to playbooks/tobiko-devstack-run.yaml index 9e3d6d3b3..0d43546e8 100644 --- a/playbooks/tobiko-devstack.yaml +++ b/playbooks/tobiko-devstack-run.yaml @@ -14,13 +14,6 @@ --- -# Changes that run through tobiko-devstack are likely to have an impact on -# the devstack part of the job, so we keep devstack in the main play to -# avoid zuul retrying on legitimate failures. -- hosts: all - roles: - - orchestrate-devstack - - hosts: tempest roles: - run-tox diff --git a/roles/multi-node-setup/README.rst b/roles/multi-node-setup/README.rst new file mode 100644 index 000000000..3580d3fa5 --- /dev/null +++ b/roles/multi-node-setup/README.rst @@ -0,0 +1,23 @@ +Set up connection between infra bridge and Neutron external bridge + +Network topology used in CI multinode jobs is described In `Devstack documention +`_ + +In case when DVR is used, there is also additional bridge ``br-infra`` added +on each node to provide connectivity to floating IPs from main node. + +This bridge needs to be connected with bridge used by Neutron as +external bridge. Typically it is ``br-ex`` and this role adds patch ports +between those bridges. + +**Role Variables** + +.. zuul:rolevar:: neutron_external_bridge_name + :default: br-ex + + Name of the Neutron external bridge. + +.. zuul:rolevar:: infra_bridge_name + :default: br-infra + + Name of the infra bridge. diff --git a/roles/multi-node-setup/defaults/main.yaml b/roles/multi-node-setup/defaults/main.yaml new file mode 100644 index 000000000..f166fe7c9 --- /dev/null +++ b/roles/multi-node-setup/defaults/main.yaml @@ -0,0 +1,2 @@ +infra_bridge_name: br-infra +neutron_external_bridge_name: br-ex diff --git a/roles/multi-node-setup/tasks/main.yaml b/roles/multi-node-setup/tasks/main.yaml new file mode 100644 index 000000000..f279efecb --- /dev/null +++ b/roles/multi-node-setup/tasks/main.yaml @@ -0,0 +1,22 @@ + +- name: Configure Neutron bridge for multi node setup + when: "( ansible_play_hosts | length ) > 1" + block: + + - name: Ensure the infra bridge exists + become: yes + openvswitch_bridge: + bridge: "{{ infra_bridge_name }}" + + - name: Ensure the Neutron external bridge exists + become: yes + openvswitch_bridge: + bridge: "{{ neutron_external_bridge_name }}" + + - name: Create patch port between bridges + become: yes + command: >- + ovs-vsctl --may-exist add-port {{ infra_bridge_name }} patch-{{ neutron_external_bridge_name }} + -- set interface patch-{{ neutron_external_bridge_name }} type=patch options:peer=patch-{{ infra_bridge_name }} + -- --may-exist add-port {{ neutron_external_bridge_name }} patch-{{ infra_bridge_name }} + -- set interface patch-{{ infra_bridge_name }} type=patch options:peer=patch-{{ neutron_external_bridge_name }} diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index b4d8f5a8b..6abd9d42e 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -18,7 +18,6 @@ - tobiko-devstack-functional - tobiko-devstack-scenario - - tobiko-devstack-faults - tobiko-devstack-faults-centos-7 - tobiko-devstack-faults-centos-7-queens - tobiko-devstack-faults-ubuntu-bionic diff --git a/zuul.d/tobiko-devstack.yaml b/zuul.d/tobiko-devstack.yaml index b15ef50c7..ee976102f 100644 --- a/zuul.d/tobiko-devstack.yaml +++ b/zuul.d/tobiko-devstack.yaml @@ -76,10 +76,9 @@ log: true yaml: true yml: true - - pre-run: playbooks/pre-tobiko-devstack.yaml - run: playbooks/tobiko-devstack.yaml - post-run: playbooks/post-tobiko-devstack.yaml + pre-run: playbooks/tobiko-devstack-pre-run.yaml + run: playbooks/tobiko-devstack-run.yaml + post-run: playbooks/tobiko-devstack-post-run.yaml irrelevant-files: - ^.*\.rst$ - ^doc/ @@ -152,7 +151,6 @@ - job: name: tobiko-devstack-scenario parent: tobiko-devstack-octavia - nodeset: openstack-single-node description: | Integration test that runs all tests against DevStack provided cloud vars: @@ -169,14 +167,10 @@ - job: - name: tobiko-devstack-scenario-multinode - parent: tobiko-devstack-scenario + name: tobiko-devstack-multinode + parent: tobiko-devstack-octavia abstract: true - description: | - Base Tobiko devstack job with multinode. - roles: - - zuul: openstack/neutron-tempest-plugin - pre-run: playbooks/multinode-devstack-pre-run.yaml + description: Base Tobiko devstack job with multinode. vars: topology: multinode devstack_localrc: @@ -206,8 +200,8 @@ - job: name: tobiko-devstack-faults - voting: false - parent: tobiko-devstack-scenario-multinode + parent: tobiko-devstack-multinode + abstract: true description: | Base Tobiko devstack job to execute scenario+faults+scenario test cases. vars: @@ -244,7 +238,7 @@ name: tobiko-devstack-faults-ubuntu-bionic parent: tobiko-devstack-faults nodeset: openstack-three-node-bionic - voting: false + voting: true vars: devstack_services: tls-proxy: true