From 61a6ac9fba3b72db5e07e0aee07ef4120a9fdd1a Mon Sep 17 00:00:00 2001 From: James Denton Date: Wed, 9 Sep 2020 19:24:59 +0000 Subject: [PATCH] Add TCP listener on OVSDB Per [1], Nova expects the local OVSDB server to listen to TCP port 6640 on localhost. This patch adds the default var neutron_ovsdb_manager and creates a TCP listener on the OVN controller/compute, if needed. [1]: https://bugs.launchpad.net/charm-nova-compute/+bug/1852200 Change-Id: Id9573af6a0d533e74af6cd4cf9c32e4088fa5e79 --- defaults/main.yml | 1 + tasks/providers/setup_ovs_ovn.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index f9419bb0..3095b16c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -445,6 +445,7 @@ neutron_ovn_northd_service_name: ovn-northd neutron_ovn_controller_service_name: ovn-controller neutron_ovn_l3_scheduler: leastloaded neutron_ovn_ip: "{{ internal_lb_vip_address }}" +neutron_ovsdb_manager: ptcp:6640:127.0.0.1 # Install Openvswitch without NSH support ovs_nsh_support: False diff --git a/tasks/providers/setup_ovs_ovn.yml b/tasks/providers/setup_ovs_ovn.yml index 5aa04cc2..12311d28 100644 --- a/tasks/providers/setup_ovs_ovn.yml +++ b/tasks/providers/setup_ovs_ovn.yml @@ -57,6 +57,19 @@ when: - neutron_services['neutron-ovn-controller']['group'] in group_names +# Create an ovsdb manager for Nova (os-vif) +- name: Register existing OVSDB Manager(s) + command: ovs-vsctl get-manager + register: existing_ovsdb_manager + when: + - neutron_services['neutron-ovn-controller']['group'] in group_names + +- name: Create OVSDB Manager + command: ovs-vsctl --id @manager create Manager "target=\"{{ neutron_ovsdb_manager }}\"" -- add Open_vSwitch . manager_options @manager + when: + - neutron_services['neutron-ovn-controller']['group'] in group_names + - neutron_ovsdb_manager not in existing_ovsdb_manager.stdout_lines + - name: Setup Network Provider Bridges openvswitch_bridge: bridge: "{{ bridge_mapping.split(':')[1] }}"