Adds OpenDaylight local OVSDB listener
With neutron switching OVSDB configuration to be done via the 'native' library, OVSDB needs to be listening on a port to accept RPCs. This adds a default listener on a non-common port and sets the URI for Neutron when using OpenDaylight so that agents may add ports to OVS. Change-Id: Ic651bc9d28f45491846b6ad1048fbc975b3e2141 Signed-off-by: Tim Rozet <trozet@redhat.com>
This commit is contained in:
parent
fef877e61d
commit
81d139edc9
@ -25,11 +25,16 @@
|
||||
# Defaults to $::os_service_default
|
||||
# Example: 'http://127.0.0.1:8080/controller/nb/v2/neutron'
|
||||
#
|
||||
# [*ovsdb_connection*]
|
||||
# (optional) The URI used to connect to the local OVSDB server
|
||||
# Defaults to 'tcp:127.0.0.1:6639'
|
||||
#
|
||||
class neutron::plugins::ml2::opendaylight (
|
||||
$package_ensure = 'present',
|
||||
$odl_username = $::os_service_default,
|
||||
$odl_password = $::os_service_default,
|
||||
$odl_url = $::os_service_default,
|
||||
$package_ensure = 'present',
|
||||
$odl_username = $::os_service_default,
|
||||
$odl_password = $::os_service_default,
|
||||
$odl_url = $::os_service_default,
|
||||
$ovsdb_connection = 'tcp:127.0.0.1:6639',
|
||||
) {
|
||||
|
||||
include ::neutron::deps
|
||||
@ -47,4 +52,8 @@ class neutron::plugins::ml2::opendaylight (
|
||||
'ml2_odl/password': value => $odl_password;
|
||||
'ml2_odl/url': value => $odl_url;
|
||||
}
|
||||
|
||||
neutron_config {
|
||||
'OVS/ovsdb_connection': value => $ovsdb_connection;
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,10 @@
|
||||
# (optional) The ODL southbound interface for OVSDB
|
||||
# Defaults to 'tcp:127.0.0.1:6640'
|
||||
#
|
||||
# [*ovsdb_server_iface*]
|
||||
# (optional) The interface for OVSDB local server to listen on
|
||||
# Defaults to 'ptcp:6639:127.0.0.1'
|
||||
#
|
||||
# [*provider_mappings*]
|
||||
# (optional) List of <physical_network>:<nic/bridge>
|
||||
# Required for VLAN provider networks.
|
||||
@ -43,6 +47,7 @@ class neutron::plugins::ovs::opendaylight (
|
||||
$odl_password = 'admin',
|
||||
$odl_check_url = 'http://127.0.0.1:8080/restconf/operational/network-topology:network-topology/topology/netvirt:1',
|
||||
$odl_ovsdb_iface = 'tcp:127.0.0.1:6640',
|
||||
$ovsdb_server_iface = 'ptcp:6639:127.0.0.1',
|
||||
$provider_mappings = [],
|
||||
$retry_interval = 60,
|
||||
$retry_count = 20,
|
||||
@ -61,8 +66,8 @@ class neutron::plugins::ovs::opendaylight (
|
||||
} ->
|
||||
# OVS manager
|
||||
exec { 'Set OVS Manager to OpenDaylight':
|
||||
command => "ovs-vsctl set-manager ${odl_ovsdb_iface}",
|
||||
unless => "ovs-vsctl show | grep 'Manager \"${odl_ovsdb_iface}\"'",
|
||||
command => "ovs-vsctl set-manager ${ovsdb_server_iface} ${odl_ovsdb_iface}",
|
||||
unless => "ovs-vsctl show | grep 'Manager \"${ovsdb_server_iface} ${odl_ovsdb_iface}\"'",
|
||||
path => '/usr/sbin:/usr/bin:/sbin:/bin',
|
||||
} ->
|
||||
# local ip
|
||||
|
@ -0,0 +1,12 @@
|
||||
---
|
||||
fixes:
|
||||
- Neutron modified the way that Agents connect to OVSDB
|
||||
server to configure OVS tap ports, etc by using the
|
||||
OVSDB server URI rather than the ovs-vsctl client.
|
||||
In ODL deployments, OVSDB server is never configured
|
||||
to listen on a port and therefore Neutron Agent
|
||||
configuration fails. This fixes that problem by
|
||||
configuring multiple managers, including a local
|
||||
listener by default on a non-standard port for OVSDB
|
||||
server. This way Neutron Agents are able to talk to
|
||||
OVSDB while OVS is also still connected to ODL.
|
@ -11,10 +11,11 @@ describe 'neutron::plugins::ml2::opendaylight' do
|
||||
|
||||
let :default_params do
|
||||
{
|
||||
:package_ensure => 'present',
|
||||
:odl_username => '<SERVICE DEFAULT>',
|
||||
:odl_password => '<SERVICE DEFAULT>',
|
||||
:odl_url => '<SERVICE DEFAULT>',
|
||||
:package_ensure => 'present',
|
||||
:odl_username => '<SERVICE DEFAULT>',
|
||||
:odl_password => '<SERVICE DEFAULT>',
|
||||
:odl_url => '<SERVICE DEFAULT>',
|
||||
:ovsdb_connection => 'tcp:127.0.0.1:6639'
|
||||
}
|
||||
end
|
||||
|
||||
@ -48,6 +49,10 @@ describe 'neutron::plugins::ml2::opendaylight' do
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2_odl/username').with_value(params[:odl_username])
|
||||
is_expected.to contain_neutron_plugin_ml2('ml2_odl/url').with_value(params[:odl_url])
|
||||
end
|
||||
|
||||
it 'configures neutron server settings' do
|
||||
is_expected.to contain_neutron_config('OVS/ovsdb_connection').with_value(params[:ovsdb_connection])
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -11,11 +11,12 @@ describe 'neutron::plugins::ovs::opendaylight' do
|
||||
|
||||
let :default_params do
|
||||
{
|
||||
:odl_username => 'admin',
|
||||
:odl_password => 'admin',
|
||||
:odl_check_url => 'http://127.0.0.1:8080/restconf/operational/network-topology:network-topology/topology/netvirt:1',
|
||||
:odl_ovsdb_iface => 'tcp:127.0.0.1:6640',
|
||||
:provider_mappings => [],
|
||||
:odl_username => 'admin',
|
||||
:odl_password => 'admin',
|
||||
:odl_check_url => 'http://127.0.0.1:8080/restconf/operational/network-topology:network-topology/topology/netvirt:1',
|
||||
:odl_ovsdb_iface => 'tcp:127.0.0.1:6640',
|
||||
:ovsdb_server_iface => 'ptcp:6639:127.0.0.1',
|
||||
:provider_mappings => [],
|
||||
:retry_interval => 60,
|
||||
:retry_count => 20,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user