Support dpdk enabled computes in vlan mode
Bridge for private/tenant network should be used as-is since physical(dpdk) interface is being connected directly to br-prv ovs bridge. Closes-Bug: #1656924 Change-Id: Ifb87b55c8d01af12a079dcfe561b4581a91a4a0b
This commit is contained in:
parent
3231445194
commit
02fe24494c
|
@ -90,15 +90,21 @@ if $use_neutron {
|
|||
if $segmentation_type == 'vlan' {
|
||||
$net_role_property = 'neutron/private'
|
||||
|
||||
$br_name = $opendaylight::dpdk_opts['enabled'] ? {
|
||||
true => 'br-prv',
|
||||
default => 'br-aux',
|
||||
}
|
||||
|
||||
|
||||
if $ext_interface {
|
||||
exec { 'ovs-set-provider-mapping':
|
||||
command => "ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config:provider_mappings=br-ex:${ext_interface},physnet2:br-aux",
|
||||
command => "ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config:provider_mappings=br-ex:${ext_interface},physnet2:${br_name}",
|
||||
path => '/usr/bin',
|
||||
require => Exec['ovs-set-manager'],
|
||||
}
|
||||
} else {
|
||||
exec { 'ovs-set-provider-mapping':
|
||||
command => "ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config:provider_mappings=physnet2:br-aux",
|
||||
command => "ovs-vsctl set Open_vSwitch $(ovs-vsctl show | head -n 1) other_config:provider_mappings=physnet2:${br_name}",
|
||||
path => '/usr/bin',
|
||||
require => Exec['ovs-set-manager'],
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ module Puppet::Parser::Functions
|
|||
# override network_scheme
|
||||
odl = function_hiera(['opendaylight'])
|
||||
network_scheme = function_hiera(['network_scheme'])
|
||||
dpdk_enabled = function_hiera(['dpdk', {}])['enabled']
|
||||
|
||||
if odl['enable_bgpvpn']
|
||||
# If bgpvpn extensions are enabled br-ex is not needed
|
||||
|
@ -21,9 +22,12 @@ module Puppet::Parser::Functions
|
|||
|
||||
endpoints = network_scheme['endpoints']
|
||||
transformations = network_scheme['transformations']
|
||||
transformations.delete_if { |action| action['action'] == 'add-br' and delete_bridges.include?(action['name']) }
|
||||
transformations.delete_if { |action| action['action'] == 'add-patch' and not (action['bridges'] & delete_bridges).empty? }
|
||||
transformations.delete_if { |action| action['action'] == 'add-port' and delete_bridges.include?(action['bridge']) }
|
||||
|
||||
unless dpdk_enabled
|
||||
transformations.delete_if { |action| action['action'] == 'add-br' and delete_bridges.include?(action['name']) }
|
||||
transformations.delete_if { |action| action['action'] == 'add-patch' and not (action['bridges'] & delete_bridges).empty? }
|
||||
transformations.delete_if { |action| action['action'] == 'add-port' and delete_bridges.include?(action['bridge']) }
|
||||
end
|
||||
|
||||
if not odl['enable_bgpvpn']
|
||||
debug "Changing network_scheme for the non bgpvpn case."
|
||||
|
@ -41,7 +45,7 @@ module Puppet::Parser::Functions
|
|||
|
||||
roles = network_scheme['roles']
|
||||
roles.each { |role,bridge| roles[role] = 'br-ex-lnx' if bridge == 'br-ex' }
|
||||
roles['neutron/private'] = 'br-aux' if roles.has_key?('neutron/private')
|
||||
roles['neutron/private'] = 'br-aux' if roles.has_key?('neutron/private') && !dpdk_enabled
|
||||
roles['neutron/floating'] = 'br-ex' if roles.has_key?('neutron/floating')
|
||||
|
||||
if endpoints.has_key? 'br-ex' and not endpoints.has_key? 'br-ex-lnx'
|
||||
|
@ -52,7 +56,7 @@ module Puppet::Parser::Functions
|
|||
endpoints['br-ex'] = endpoints.delete 'br-floating'
|
||||
end
|
||||
|
||||
if endpoints.has_key? 'br-prv'
|
||||
if endpoints.has_key? 'br-prv' && !dpdk_enabled
|
||||
endpoints['br-aux'] = endpoints.delete 'br-prv'
|
||||
end
|
||||
else
|
||||
|
|
|
@ -9,4 +9,5 @@ class opendaylight {
|
|||
$odl_mgmt_ips = values($odl_mgmt_ips_hash)
|
||||
$odl_nodes_names = keys($odl_mgmt_ips_hash)
|
||||
$node_internal_address = $odl_mgmt_ips_hash["node-${node_uid}"]
|
||||
$dpdk_opts = hiera_hash('dpdk', {})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue