Add vxlan to linuxbridge agent when enabled

Packstack should add vxlan to linuxbridge configuration
when enabled.

Change-Id: I697f9abed1ac96975b4a67a68bae96bb5eb5670c
Closes-bug: #1599025
This commit is contained in:
Ivan Chavero
2016-07-13 02:15:44 -06:00
committed by Javier Pena
parent b076dcd6ca
commit 1ca1b0268e
4 changed files with 22 additions and 4 deletions

View File

@@ -717,6 +717,8 @@ def create_l3_manifests(config, messages):
config['CONFIG_NEUTRON_OVS_BRIDGE_CREATE'] = 'y'
else:
config['CONFIG_NEUTRON_OVS_BRIDGE_CREATE'] = 'n'
else:
config['CONFIG_NEUTRON_OVS_BRIDGE_CREATE'] = 'n'
def create_dhcp_manifests(config, messages):

View File

@@ -1,5 +1,12 @@
class packstack::neutron::lb_agent ()
{
$bind_host = hiera('CONFIG_IP_VERSION') ? {
'ipv6' => '::0',
default => '0.0.0.0',
# TO-DO(mmagr): Add IPv6 support when hostnames are used
}
$neutron_lb_interface_mappings = hiera_array('CONFIG_NEUTRON_LB_INTERFACE_MAPPINGS')
$use_subnets_value = hiera('CONFIG_USE_SUBNETS')
@@ -8,7 +15,16 @@ class packstack::neutron::lb_agent ()
default => false,
}
class { '::neutron::agents::ml2::linuxbridge':
physical_interface_mappings => force_interface($neutron_lb_interface_mappings, $use_subnets),
if ( 'vxlan' in hiera_array('CONFIG_NEUTRON_ML2_TYPE_DRIVERS') ){
class { '::neutron::agents::ml2::linuxbridge':
physical_interface_mappings => force_interface($neutron_lb_interface_mappings, $use_subnets),
tunnel_types => ['vxlan'],
local_ip => $bind_host,
}
}
else {
class { '::neutron::agents::ml2::linuxbridge':
physical_interface_mappings => force_interface($neutron_lb_interface_mappings, $use_subnets),
}
}
}

View File

@@ -45,7 +45,7 @@ if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
include '::packstack::neutron::rabbitmq'
case hiera('CONFIG_NEUTRON_L2_AGENT') {
'openvswitch': { include '::packstack::neutron::ovs_agent' }
'': { include '::packstack::neutron::lb_agent' }
'linuxbridge': { include '::packstack::neutron::lb_agent' }
default: { include '::packstack::neutron::ovs_agent' }
}
include '::packstack::neutron::bridge'

View File

@@ -30,7 +30,7 @@ if hiera('CONFIG_NEUTRON_INSTALL') == 'y' {
case hiera('CONFIG_NEUTRON_L2_AGENT') {
'openvswitch': { include '::packstack::neutron::ovs_agent' }
'': { include '::packstack::neutron::lb_agent' }
'linuxbridge': { include '::packstack::neutron::lb_agent' }
default: { include '::packstack::neutron::ovs_agent' }
}
include '::packstack::neutron::bridge'