Fix bridge creation for compute nodes when using VLAN

Commit 51fb0c5200 changed the OVS
bridge creation to only happen in network nodes. This breaks setups
with VLAN tenant networks, where a bridge is required in compute
nodes.

This patch fixes this, and also creates bridges when using VLAN
networking. Depending on the configuration, it may create an unneeded
bridge in compute nodes for the external network, if both are
configured, e.g. br-ex for external traffic and br-vlan for tenant
networking. This should be handled in a separate patch, since there
is currently no way to distinguish which bridge is needed in compute
nodes and which one is not.

This fixes bz#1325637

Change-Id: Ia6e982943db0af5465f9e18261e2803a22a0ace0
This commit is contained in:
Javier Pena
2016-04-11 13:21:22 +02:00
committed by Javier Peña
parent 5b2648aec3
commit 3824694f50

View File

@@ -872,10 +872,6 @@ 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
if host in network_hosts:
manifestdata += "$create_bridges = true\n"
else:
manifestdata += "$create_bridges = false\n"
# neutron ovs port only on network hosts
if (
agent == "openvswitch" and (
@@ -887,6 +883,9 @@ def create_l2_agent_manifests(config, messages):
common.cidr_to_ifname(i, host, config) for i in iface_arr
]
config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"] = iface_arr
manifestdata += "$create_bridges = true\n"
else:
manifestdata += "$create_bridges = false\n"
manifestdata += getManifestTemplate(template_name)
appendManifestFile(manifestfile, manifestdata + "\n")
# Additional configurations required for compute hosts and