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
This commit is contained in:
James Denton 2020-09-09 19:24:59 +00:00
parent 18468787b9
commit 61a6ac9fba
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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] }}"