From 1ca1b0268e474c11acbedba7823efc4f1bd0db02 Mon Sep 17 00:00:00 2001 From: Ivan Chavero Date: Wed, 13 Jul 2016 02:15:44 -0600 Subject: [PATCH] Add vxlan to linuxbridge agent when enabled Packstack should add vxlan to linuxbridge configuration when enabled. Change-Id: I697f9abed1ac96975b4a67a68bae96bb5eb5670c Closes-bug: #1599025 --- packstack/plugins/neutron_350.py | 2 ++ .../packstack/manifests/neutron/lb_agent.pp | 20 +++++++++++++++++-- packstack/puppet/templates/compute.pp | 2 +- packstack/puppet/templates/network.pp | 2 +- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packstack/plugins/neutron_350.py b/packstack/plugins/neutron_350.py index 44085c2ff..e0c887454 100644 --- a/packstack/plugins/neutron_350.py +++ b/packstack/plugins/neutron_350.py @@ -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): diff --git a/packstack/puppet/modules/packstack/manifests/neutron/lb_agent.pp b/packstack/puppet/modules/packstack/manifests/neutron/lb_agent.pp index d22414fa9..cfef43a89 100644 --- a/packstack/puppet/modules/packstack/manifests/neutron/lb_agent.pp +++ b/packstack/puppet/modules/packstack/manifests/neutron/lb_agent.pp @@ -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), + } } } diff --git a/packstack/puppet/templates/compute.pp b/packstack/puppet/templates/compute.pp index 601ccbd9a..22b9d5dee 100644 --- a/packstack/puppet/templates/compute.pp +++ b/packstack/puppet/templates/compute.pp @@ -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' diff --git a/packstack/puppet/templates/network.pp b/packstack/puppet/templates/network.pp index 4c99c4173..b1633a57e 100644 --- a/packstack/puppet/templates/network.pp +++ b/packstack/puppet/templates/network.pp @@ -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'