kolla-ansible/ansible/roles/neutron/templates/openvswitch_agent.ini.j2
Mark Goddard 64dcfb7291 Add support for customising Neutron physical network names
Previously Kolla Ansible hard-coded Neutron physical networks starting
at physnet1 up to physnetN, matching the number of interfaces in
neutron_external_interface and bridges in neutron_bridge_name.

Sometimes we may want to customise the physical network names used. This
may be to allow for not all hosts having access to all physical
networks, or to use more descriptive names.

For example, in an environment with a separate physical network for
Ironic provisioning, controllers might have access to two physical
networks, while compute nodes have access to one.

This change adds a neutron_physical_networks variable, making it
possible to customise the Neutron physical network names used for the
OVS, OVN, Linux bridge and OVS DPDK plugins. The default behaviour is
unchanged.

Change-Id: Ib5b8ea727014964919c6b3bd2352bac4a4ac1787
2024-06-19 14:15:51 +01:00

35 lines
1.2 KiB
Django/Jinja

#jinja2: trim_blocks: False
[agent]
tunnel_types = vxlan
l2_population = true
arp_responder = true
{% if enable_neutron_dvr | bool %}
enable_distributed_routing = True
{% endif %}
{% if neutron_agent_extensions %}
extensions = {{ neutron_agent_extensions|map(attribute='name')|join(',') }}
{% endif %}
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[ovs]
{% if inventory_hostname in groups["network"] or (inventory_hostname in groups["compute"] and computes_need_external_bridge | bool ) %}
{# Format: physnet1:br1,physnet2:br2 #}
bridge_mappings = {{ neutron_physical_networks.split(',') | zip(neutron_bridge_name.split(',')) | map('join', ':') | join(',') }}
{% endif %}
datapath_type = {{ ovs_datapath }}
ovsdb_connection = tcp:127.0.0.1:{{ ovsdb_port }}
ovsdb_timeout = {{ ovsdb_timeout }}
local_ip = {{ tunnel_interface_address }}
{% if enable_nova_fake | bool %}
integration_bridge = br-int-{{ item }}
{% endif %}
{% if enable_neutron_sriov | bool %}
[FDB]
# Allows instances using sriov ports to communicate with instances that do not.
# See https://docs.openstack.org/neutron/latest/admin/config-sriov.html
shared_physical_device_mappings = {{ neutron_sriov_physnets }}
{% endif %}