From c3cb8525f43e7b43f428a36fc8be11d6ac21ad4f Mon Sep 17 00:00:00 2001 From: James Denton Date: Fri, 13 Nov 2020 08:10:48 -0600 Subject: [PATCH] Test OVS/OVN deployments on CentOS 8 As OVS/OVN overtakes LXB as the preferred network driver, we must ensure they are deployed properly across supported operating systems. These tests should ensure OVS-based deployment(s) are (at least) functional. Change-Id: I12f442399ab874206a9930877ffbe325ceb902b9 --- tasks/neutron_pre_install.yml | 10 +++++++ tests/neutron-overrides-ovn.yml | 52 +++++++++++++++++++++++++++++++++ tests/ovn_inventory | 6 ++++ tests/ovs_inventory | 6 ++++ vars/redhat.yml | 5 +++- zuul.d/jobs.yaml | 10 +++++-- zuul.d/project.yaml | 5 ++-- 7 files changed, 89 insertions(+), 5 deletions(-) diff --git a/tasks/neutron_pre_install.yml b/tasks/neutron_pre_install.yml index bc539e6c..b0c53fd4 100644 --- a/tasks/neutron_pre_install.yml +++ b/tasks/neutron_pre_install.yml @@ -113,6 +113,16 @@ - ansible_pkg_mgr == 'zypper' - ovs_nsh_support | bool +- name: Add dependency repos for Neutron + package: + name: "{{ neutron_repos }}" + state: "{{ neutron_package_state }}" + retries: 5 + delay: 2 + when: + - ansible_pkg_mgr in ['yum', 'dnf'] + - neutron_needs_openvswitch | bool + - name: Create ovs tempfiles directory block: - name: Create ovs tmpfiles file diff --git a/tests/neutron-overrides-ovn.yml b/tests/neutron-overrides-ovn.yml index 7b8b9a50..8a164a5a 100644 --- a/tests/neutron-overrides-ovn.yml +++ b/tests/neutron-overrides-ovn.yml @@ -41,3 +41,55 @@ neutron_ml2_conf_ini_overrides: ml2: physical_network_mtus: vlan:1500 path_mtu: 1558 + +haproxy_ssl: false +external_lb_vip_address: 10.1.0.1 +internal_lb_vip_address: 10.1.0.1 + +test_neutron_server_host: "{{ external_lb_vip_address }}" + +haproxy_default_services: + - service: + haproxy_service_name: neutron_server + haproxy_backend_nodes: "{{ groups['neutron_server'] | default([]) }}" + haproxy_port: 9696 + haproxy_ssl: "{{ haproxy_ssl }}" + haproxy_balance_type: http + haproxy_backend_options: + - "httpchk GET /" + - service: + haproxy_service_name: neutron_ovn_northd_northbound + haproxy_backend_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[:1] }}" # list expected + haproxy_backup_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[1:] }}" + haproxy_port: 6641 + haproxy_bind: "{{ [internal_lb_vip_address] }}" + haproxy_balance_type: tcp + haproxy_timeout_client: 90m + haproxy_timeout_server: 90m + haproxy_backend_options: + - tcpka + haproxy_service_enabled: "{{ (neutron_plugin_type == 'ml2.ovn') and (groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0) }}" + - service: + haproxy_service_name: neutron_ovn_northd_southbound + haproxy_backend_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[:1] }}" + haproxy_backup_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[1:] }}" + haproxy_port: 6642 + haproxy_bind: "{{ [internal_lb_vip_address] }}" + haproxy_balance_type: tcp + haproxy_timeout_client: 90m + haproxy_timeout_server: 90m + haproxy_backend_options: + - tcpka + haproxy_service_enabled: "{{ (neutron_plugin_type == 'ml2.ovn') and (groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0) }}" + - service: + haproxy_service_name: neutron_ovn_ovsdb_server + haproxy_backend_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[:1] }}" + haproxy_backup_nodes: "{{ (groups['neutron_ovn_northd'] | default([]))[1:] }}" + haproxy_port: 6640 + haproxy_bind: "{{ [internal_lb_vip_address] }}" + haproxy_balance_type: tcp + haproxy_timeout_client: 90m + haproxy_timeout_server: 90m + haproxy_backend_options: + - tcpka + haproxy_service_enabled: "{{ (neutron_plugin_type == 'ml2.ovn') and (groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0) }}" diff --git a/tests/ovn_inventory b/tests/ovn_inventory index 8e67dfd2..72fe495c 100644 --- a/tests/ovn_inventory +++ b/tests/ovn_inventory @@ -70,3 +70,9 @@ neutron_server [utility_all] infra1 + +[haproxy_all:children] +haproxy + +[haproxy] +localhost diff --git a/tests/ovs_inventory b/tests/ovs_inventory index fcc62e69..8b65f7fe 100644 --- a/tests/ovs_inventory +++ b/tests/ovs_inventory @@ -83,3 +83,9 @@ neutron_server [utility_all] infra1 + +[haproxy_all:children] +haproxy + +[haproxy] +localhost diff --git a/vars/redhat.yml b/vars/redhat.yml index 49546cf5..1e3e7f62 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +neutron_repos: + - centos-release-nfv-openvswitch + neutron_ovs_distro_packages: - openvswitch @@ -22,7 +25,7 @@ neutron_ovn_northd_service_name: ovn-northd neutron_ovn_controller_service_name: ovn-controller -neutron_ovs_socket_path: "/usr/local/var/run/openvswitch" +neutron_ovs_socket_path: "/var/run/openvswitch" neutron_distro_packages: - conntrack-tools diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 4a54970f..0ffcbb71 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -19,6 +19,12 @@ vars: tox_env: ovs +- job: + name: openstack-ansible-ovs-centos-8 + parent: openstack-ansible-functional-centos-8 + vars: + tox_env: ovs + - job: name: openstack-ansible-ovn-ubuntu-bionic parent: openstack-ansible-functional-ubuntu-bionic @@ -26,8 +32,8 @@ tox_env: ovn - job: - name: openstack-ansible-ovn-centos-7 - parent: openstack-ansible-functional-centos-7 + name: openstack-ansible-ovn-centos-8 + parent: openstack-ansible-functional-centos-8 vars: tox_env: ovn diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 02b8ec5f..caff154e 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -24,9 +24,9 @@ check: jobs: - openstack-ansible-ovs-ubuntu-bionic + - openstack-ansible-ovs-centos-8 - openstack-ansible-ovn-ubuntu-bionic - - openstack-ansible-ovn-centos-7: - voting: false + - openstack-ansible-ovn-centos-8 - openstack-ansible-deploy-aio_metal_calico-ubuntu-bionic: voting: false - openstack-ansible-opendaylight-ubuntu-bionic @@ -39,6 +39,7 @@ gate: jobs: - openstack-ansible-ovs-ubuntu-bionic + - openstack-ansible-ovs-centos-8 - openstack-ansible-ovn-ubuntu-bionic - openstack-ansible-deploy-aio_metal_calico-ubuntu-bionic: voting: false