Do not create OVS bridges in compute nodes

The OVS bridges were created in compute nodes when they should not.
Only network nodes should have them.

Change-Id: I44e6d60b5349dd79d8d689cba6c039acf1b3b8a5
This commit is contained in:
Javier Pena 2015-11-04 21:31:50 +01:00
parent 81a934b86f
commit 51fb0c5200
2 changed files with 14 additions and 2 deletions

View File

@ -784,6 +784,10 @@ 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 (

View File

@ -13,9 +13,17 @@ if $ovs_agent_vxlan_cfg_neut_ovs_tun_if != '' {
$localip = $cfg_neutron_ovs_host
}
if $create_bridges {
$bridge_uplinks = hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_IFACES')
$bridge_mappings = hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS')
} else {
$bridge_uplinks = []
$bridge_mappings = []
}
class { '::neutron::agents::ml2::ovs':
bridge_uplinks => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_IFACES'),
bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'),
bridge_uplinks => $bridge_uplinks,
bridge_mappings => $bridge_mappings,
enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'),
tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'),
local_ip => force_ip($localip),