Support DVR in p-only mode and stop lacp on compute for P+V mode

Change-Id: I7709f9fc3767209ef5a78ff06e25ac37303f2288
This commit is contained in:
Kanzhe Jiang 2016-02-24 11:36:06 -08:00
parent 05c5cf6d24
commit a62bff2b66
7 changed files with 70 additions and 33 deletions

View File

@ -16,5 +16,5 @@
notice('MODULAR: bigswitch compute-network-config')
include bcf::params
if $bcf::params::openstack::bcf_mode == 'P-Only' {
include bcf::p_only::compute-network-config
include bcf::p_only::compute_network_config
}

View File

@ -15,26 +15,24 @@
#
notice('MODULAR: bigswitch general-network-config')
class bcf::p_v::general-network-config {
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$sys_desc_lacp = '5c:16:c7:00:00:04'
include bcf
include bcf::params
$binpath = '/usr/local/bin/:/bin/:/usr/bin:/usr/sbin:/usr/local/sbin:/sbin'
$sys_desc_lacp = '5c:16:c7:00:00:04'
# lldp
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp', '/dev/null')
if($a != '') {
file { '/bin/send_lldp':
ensure => file,
content => $a,
mode => '0777',
}
}
$a = file('/etc/fuel/plugins/fuel-plugin-bigswitch-1.0/python_scripts/send_lldp', '/dev/null')
if($a != '') {
file { '/bin/send_lldp':
ensure => file,
content => $a,
mode => '0777',
}
}
file { '/etc/init/send_lldp.conf':
ensure => file,
content => "
file { '/etc/init/send_lldp.conf':
ensure => file,
content => "
description \"BCF LLDP\"
start on runlevel [2345]
stop on runlevel [!2345]
@ -43,18 +41,17 @@ script
exec /bin/send_lldp --system-desc ${sys_desc_lacp} --system-name $(uname -n) -i 10 --network_interface ${bcf::itfs}
end script
",
}
}
service { 'send_lldp':
ensure => running,
enable => true,
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
}
# load bonding module
file_line {'load bonding on boot':
path => '/etc/modules',
line => 'bonding',
match => '^bonding$',
}
service { 'send_lldp':
ensure => running,
enable => true,
require => [File['/bin/send_lldp'], File['/etc/init/send_lldp.conf']],
}
# load bonding module
file_line {'load bonding on boot':
path => '/etc/modules',
line => 'bonding',
match => '^bonding$',
}

View File

@ -24,7 +24,7 @@ class bcf {
prepare_network_config($network_scheme)
$gw = get_default_gateways()
$phy_devs = get_network_role_property('neutron/private', 'phys_dev')
$if_str = "$phy_devs"
$if_str = "${phy_devs}"
if $if_str =~ /^bond.*/ {
$ifaces = join($phy_devs, ',')
$bond = true

View File

@ -170,4 +170,41 @@ class bcf::p_only::compute {
value => "${novnc_protocol}://${bcf::public_vip}:6080/vnc_auto.html",
notify => Service['nova-compute']
}
if $bcf::params::openstack::neutron_dvr {
notice('MODULAR: bigswitch bcf::p_only::compute, dvr')
service { 'neutron-l3-agent':
ensure => running,
enable => true,
}
# config /etc/neutron/l3-agent.ini
ini_setting { 'l3 agent disable metadata proxy':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'enable_metadata_proxy',
value => 'False',
notify => Service['neutron-l3-agent'],
}
ini_setting { 'l3 agent external network bridge':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'external_network_bridge',
value => '',
notify => Service['neutron-l3-agent'],
}
ini_setting { 'l3 agent handle_internal_only_routers':
ensure => present,
path => '/etc/neutron/l3_agent.ini',
section => 'DEFAULT',
key_val_separator => '=',
setting => 'handle_internal_only_routers',
value => 'True',
notify => Service['neutron-l3-agent'],
}
}
}

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
#
class bcf::p_only::compute-network-config {
class bcf::p_only::compute_network_config {
include bcf
include bcf::params

View File

@ -24,6 +24,8 @@ class bcf::params::openstack {
$auth_password = $quantum_settings['keystone']['admin_password']
$auth_tenant_name = 'services'
$neutron_adv_conf = hiera('neutron_advanced_configuration')
$neutron_dvr = $neutron_adv_conf['neutron_dvr']
$network_scheme = hiera('network_scheme')
$fuel_master = hiera('master_ip')
$bcf_hash = hiera('fuel-plugin-bigswitch')

1
puppet-lint.conf Normal file
View File

@ -0,0 +1 @@
--no-2sp_soft_tabs-check