[Neutron] start using bridge_uplinks for ovs agent
Previously we used to connect iface and bridge for ovs setup like on
picture with manually connecting in neutron_ovs_port, but now this
should be done by neutron::agents::ml2::ovs with providing bridge_uplinks
option.
+---------------+ +---------------+
| <br-a> <br-b> | | <br-a> <br-b> |
| | | | | | | |
| <a> <b> | | <a> <b> |
+---|------|----+ +---|------|----+
+------|-----------/ |
| +------------------/
[sw1] [sw2]
Change-Id: Ia0eb089d9b3f93d01f3c4a2bbadfe2cf64a06a9c
Closes-Bug: rhbz#1177788
(cherry picked from commit b99de0b812)
This commit is contained in:
committed by
Lukas Bezdicka
parent
857920ecb7
commit
33e788d17d
@@ -757,6 +757,7 @@ def create_l2_agent_manifests(config, messages):
|
||||
# properly formatted by packstack, then consumed by the puppet module.
|
||||
# For example, the input string 'A, B' should formatted as '['A','B']'.
|
||||
config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"] = bm_arr
|
||||
config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"] = []
|
||||
elif agent == "linuxbridge":
|
||||
host_var = 'CONFIG_NEUTRON_LB_HOST'
|
||||
template_name = 'neutron_lb_agent'
|
||||
@@ -766,20 +767,15 @@ def create_l2_agent_manifests(config, messages):
|
||||
for host in network_hosts | compute_hosts:
|
||||
manifestfile = "%s_neutron.pp" % (host,)
|
||||
manifestdata = "$cfg_neutron_ovs_host = '%s'\n" % host
|
||||
manifestdata += getManifestTemplate(template_name)
|
||||
appendManifestFile(manifestfile, manifestdata + "\n")
|
||||
# neutron ovs port only on network hosts
|
||||
if (
|
||||
agent == "openvswitch" and (
|
||||
(host in network_hosts and tunnel_types)
|
||||
or 'vlan' in ovs_type)
|
||||
):
|
||||
bridge_key = 'CONFIG_NEUTRON_OVS_BRIDGE'
|
||||
iface_key = 'CONFIG_NEUTRON_OVS_IFACE'
|
||||
for if_map in iface_arr:
|
||||
config[bridge_key], config[iface_key] = if_map.split(':')
|
||||
manifestdata = getManifestTemplate("neutron_ovs_port")
|
||||
appendManifestFile(manifestfile, manifestdata + "\n")
|
||||
config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"] = iface_arr
|
||||
manifestdata += getManifestTemplate(template_name)
|
||||
appendManifestFile(manifestfile, manifestdata + "\n")
|
||||
# Additional configurations required for compute hosts and
|
||||
# network hosts.
|
||||
manifestdata = getManifestTemplate('neutron_bridge_module')
|
||||
|
||||
@@ -8,6 +8,7 @@ if $ovs_agent_vxlan_cfg_neut_ovs_tun_if != '' {
|
||||
}
|
||||
|
||||
class { 'neutron::agents::ml2::ovs':
|
||||
bridge_uplinks => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_IFACES'),
|
||||
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
|
||||
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
|
||||
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
$cfg_neutron_ovs_iface = hiera('CONFIG_NEUTRON_OVS_IFACE')
|
||||
|
||||
vs_port { $cfg_neutron_ovs_iface:
|
||||
ensure => present,
|
||||
bridge => hiera('CONFIG_NEUTRON_OVS_BRIDGE'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user