From 8c8e21a5a3acb5d0ac3e7db4aa7be15bec4880f6 Mon Sep 17 00:00:00 2001 From: James Denton Date: Tue, 4 Dec 2018 17:36:31 +0000 Subject: [PATCH] Only enable OVN VIPs when ml2.ovn plugin is used This patch updates the haproxy group_vars logic to only enable OVN-related VIPs when the OVN ML2 plugin is used. It also removes OVN bits from the inventory to be added as an env.d override as needed. Change-Id: Ied1e79965c340c1d4ca430a830199978782117d0 Depends-On: https://review.openstack.org/623515 --- inventory/env.d/neutron.yml | 11 ----------- inventory/env.d/nova.yml | 1 - inventory/group_vars/haproxy/haproxy.yml | 6 +++--- tests/test_inventory.py | 3 --- 4 files changed, 3 insertions(+), 18 deletions(-) diff --git a/inventory/env.d/neutron.yml b/inventory/env.d/neutron.yml index 79a62c0f85..a594c11373 100644 --- a/inventory/env.d/neutron.yml +++ b/inventory/env.d/neutron.yml @@ -41,12 +41,6 @@ component_skel: neutron_metadata_agent: belongs_to: - neutron_all - neutron_ovn_controller: - belongs_to: - - neutron_all - neutron_ovn_northd: - belongs_to: - - neutron_all neutron_sriov_nic_agent: belongs_to: - neutron_all @@ -74,11 +68,6 @@ container_skel: - neutron_sriov_nic_agent properties: is_metal: true - neutron_ovn_northd_container: - belongs_to: - - network_containers - contains: - - neutron_ovn_northd neutron_server_container: belongs_to: - network_containers diff --git a/inventory/env.d/nova.yml b/inventory/env.d/nova.yml index 1f384d98a4..71cd7ad252 100644 --- a/inventory/env.d/nova.yml +++ b/inventory/env.d/nova.yml @@ -59,7 +59,6 @@ container_skel: contains: - neutron_linuxbridge_agent - neutron_openvswitch_agent - - neutron_ovn_controller - neutron_sriov_nic_agent - nova_compute properties: diff --git a/inventory/group_vars/haproxy/haproxy.yml b/inventory/group_vars/haproxy/haproxy.yml index c84633339c..fde97540a6 100644 --- a/inventory/group_vars/haproxy/haproxy.yml +++ b/inventory/group_vars/haproxy/haproxy.yml @@ -358,7 +358,7 @@ haproxy_default_services: haproxy_timeout_server: 90m haproxy_backend_options: - tcpka - haproxy_service_enabled: "{{ groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0 }}" + 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] }}" @@ -370,7 +370,7 @@ haproxy_default_services: haproxy_timeout_server: 90m haproxy_backend_options: - tcpka - haproxy_service_enabled: "{{ groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0 }}" + 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] }}" @@ -382,4 +382,4 @@ haproxy_default_services: haproxy_timeout_server: 90m haproxy_backend_options: - tcpka - haproxy_service_enabled: "{{ groups['neutron_ovn_northd'] is defined and groups['neutron_ovn_northd'] | length > 0 }}" + 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/test_inventory.py b/tests/test_inventory.py index e9613a1ce5..7745ffc8d1 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -340,9 +340,6 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'neutron_metadata_agent', 'neutron_metering_agent', 'neutron_openvswitch_agent', - 'neutron_ovn_controller', - 'neutron_ovn_northd', - 'neutron_ovn_northd_container', 'neutron_sriov_nic_agent', 'neutron_server', 'neutron_server_container',