Fix DHCP broadcast reply in IB

Change-Id: I0006302a5977955641e582251754887374ed1801
This commit is contained in:
Aviram Bar-Haim 2016-02-21 18:32:18 +02:00
parent 9c4d5fb260
commit ae58e9faec
4 changed files with 18 additions and 35 deletions

View File

@ -18,8 +18,5 @@ if ($mlnx['sriov']) {
}
# Configure broadcast dnsmasq for IB PV
elsif ($mlnx['driver'] == 'eth_ipoib') {
class { 'mellanox_openstack::controller_ib_pv' :
mlnx_driver => $mlnx['driver'],
mlnx_sriov => $mlnx['sriov'],
}
class { 'mellanox_openstack::controller_ib_pv' : }
}

View File

@ -1,34 +1,16 @@
class mellanox_openstack::controller_ib_pv (
$mlnx_driver,
$mlnx_sriov
){
class mellanox_openstack::controller_ib_pv (){
include neutron::params
$dhcp_agent = $neutron::params::dhcp_agent_service
$mlnx_dnsmasq_pv_config_file = '/etc/mlnx_dnsmasq_pv.conf'
if ( $mlnx_driver == 'eth_ipoib' and $mlnx_sriov != true ){
file { $mlnx_dnsmasq_pv_config_file :
ensure => file,
owner => 'neutron',
group => 'neutron',
mode => '644',
content => template('mellanox_openstack/mlnx_dnsmasq_pv_config.erb'),
} ~>
neutron_dhcp_agent_config { 'DEFAULT/dnsmasq_config_file' :
value => $mlnx_dnsmasq_pv_config_file,
}
service { $dhcp_agent :
ensure => running,
enable => true,
provider => pacemaker,
subscribe => [File[$mlnx_dnsmasq_pv_config_file],
Neutron_dhcp_agent_config['DEFAULT/dnsmasq_config_file']]
}
neutron_dhcp_agent_config { 'DEFAULT/dhcp_broadcast_reply' :
value => 'True',
}
service { $dhcp_agent :
ensure => running,
enable => true,
provider => pacemaker,
subscribe => [Neutron_dhcp_agent_config['DEFAULT/dhcp_broadcast_reply']],
}
}

View File

@ -48,17 +48,21 @@ class mellanox_openstack::controller_sriov (
Neutron_plugin_ml2 <||> ~>
Service[$server_service]
if ( $mlnx_driver == 'eth_ipoib' and $mlnx_sriov == true ){
if ( $mlnx_driver == 'eth_ipoib' ){
neutron_dhcp_agent_config { 'DEFAULT/dhcp_driver' :
value => 'networking_mlnx.dhcp.mlnx_dhcp.MlnxDnsmasq',
}
neutron_dhcp_agent_config { 'DEFAULT/dhcp_broadcast_reply' :
value => 'True',
}
service { $dhcp_agent :
ensure => running,
enable => true,
provider => pacemaker,
subscribe => Neutron_dhcp_agent_config['DEFAULT/dhcp_driver'],
subscribe => [Neutron_dhcp_agent_config['DEFAULT/dhcp_driver'],
Neutron_dhcp_agent_config['DEFAULT/dhcp_broadcast_reply']],
}
}
}

View File

@ -5,7 +5,7 @@ name: mellanox-plugin
title: Mellanox Openstack features
# Plugin version
version: 2.0.24
version: 2.0.25
# Description
description: Enable features over Mellanox hardware