- Enable IPv6 deployment
2018-09-18 Release 8.4.1
- Fix opendaylight karaf log file rotation
+2018-09-27 Release 8.4.2
+- Bind OVSDB and OpenFlow addresses to specific IP
require => File['org.ops4j.pax.web.cfg']
}
- # Enable TLS with OVSDB
- file { 'org.opendaylight.ovsdb.library.cfg':
- ensure => file,
- path => '/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg',
- owner => 'odl',
- group => 'odl',
- source => 'puppet:///modules/opendaylight/org.opendaylight.ovsdb.library.cfg',
- }
-
# Configure OpenFlow plugin to use TLS
$transport_protocol = 'TLS'
} else {
require => File['org.ops4j.pax.web.cfg']
}
}
+
+ # Configure OVSDB
+ file { 'org.opendaylight.ovsdb.library.cfg':
+ ensure => file,
+ path => '/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg',
+ owner => 'odl',
+ group => 'odl',
+ content => template('opendaylight/org.opendaylight.ovsdb.library.cfg.erb'),
+ }
+
# Configure OpenFlow plugin to use TCP/TLS
file { 'default-openflow-connection-config.xml':
ensure => file,
# [*odl_rest_port *]
# Port for ODL northbound REST interface to listen on.
# [*odl_bind_ip *]
-# IP for ODL northbound REST interface to bind to.
+# IP for ODL northbound REST interface and southbound OVSDB/OpenFlow to bind to.
# [*rpm_repo*]
# Repo URL to install ODL RPM from, in .repo baseurl format.
# [*deb_repo*]
{
"name": "opendaylight-opendaylight",
- "version": "8.4.1",
+ "version": "8.4.2",
"author": "Daniel Farrell",
"summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
"license": "BSD-2-Clause",
# Run shared tests applicable to all supported OSs
# Note that this function is defined in spec_helper
- generic_tests
+ generic_tests(odl_bind_ip: '127.0.0.1')
# Run test that specialize in checking ODL REST port config
# Note that this function is defined in spec_helper
# Run shared tests applicable to all supported OSs
# Note that this function is defined in spec_helper
- generic_tests
+ generic_tests(odl_bind_ip: '127.0.0.1')
# Run test that specialize in checking websocket address
# Note that this function is defined in spec_helper
# Tests that are common to all possible configurations
def generic_tests(options = {})
java_opts = options.fetch(:java_opts, '')
- odl_bind_ip = options.fetch(:odl_bind_ip, '127.0.0.1')
+ odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
# Confirm that module compiles
it { should compile }
)
}
+ it {
+ should contain_file('org.opendaylight.ovsdb.library.cfg').with(
+ 'ensure' => 'file',
+ 'path' => '/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg',
+ 'owner' => 'odl',
+ 'group' => 'odl',
+ 'content' => /ovsdb-listener-ip = #{odl_bind_ip}/
+ )
+ }
+
+ it {
+ should contain_file('default-openflow-connection-config.xml').with(
+ 'ensure' => 'file',
+ 'path' => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml',
+ 'owner' => 'odl',
+ 'group' => 'odl',
+ 'content' => /<address>#{odl_bind_ip}<\/address>/
+ )
+ }
+
end
# Shared tests that specialize in testing log file size and rollover
'group' => 'odl',
)
should contain_file('org.opendaylight.ovsdb.library.cfg').with(
- 'ensure' => 'file',
- 'path' => '/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg',
- 'owner' => 'odl',
- 'group' => 'odl',
- 'source' => 'puppet:///modules/opendaylight/org.opendaylight.ovsdb.library.cfg'
+ 'ensure' => 'file',
+ 'path' => '/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg',
+ 'owner' => 'odl',
+ 'group' => 'odl',
+ 'content' => /use-ssl = true/
)
should contain_file('/opt/opendaylight/configuration/ssl').with(
'ensure' => 'directory',
'match' => '^is-statistics-polling-on=.*$',
)
}
-end
\ No newline at end of file
+end
its(:content) { should match /sshHost = #{odl_bind_ip}/ }
end
+ describe file('/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg') do
+ it { should be_file }
+ it { should be_owned_by 'odl' }
+ it { should be_grouped_into 'odl' }
+ its(:content) { should match /ovsdb-listener-ip = #{odl_bind_ip}/ }
+ end
+
+ describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml') do
+ it { should be_file }
+ it { should be_owned_by 'odl' }
+ it { should be_grouped_into 'odl' }
+ its(:content) { should match /<address>#{odl_bind_ip}<\/address>/ }
+ end
+
describe command("loop_count=0; until [[ \$loop_count -ge 30 ]]; do netstat -punta | grep 8101 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
its(:exit_status) { should eq 0 }
end
+
+ describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6653 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
+ its(:exit_status) { should eq 0 }
+ end
+
+ describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6640 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
+ its(:exit_status) { should eq 0 }
+ end
end
end
<switch-connection-config xmlns="urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:config">
<instance-name>openflow-switch-connection-provider-default-impl</instance-name>
<port>6653</port>
+ <address><%= scope.lookupvar('opendaylight::odl_bind_ip') %></address>
<transport-protocol><%= scope.lookupvar('opendaylight::config::transport_protocol') %></transport-protocol>
<tls>
<keystore>configuration/ssl/ctl.jks</keystore>
#default listens on port 6640 for switch initiated connection. Please use following config
#knob for changing this default port.
ovsdb-listener-port = 6640
+ovsdb-listener-ip = <%= scope.lookupvar('opendaylight::odl_bind_ip') %>
#This flag will be enforced across all the connection's (passive and active) if set to true
+<%- if scope.lookupvar('opendaylight::enable_tls') -%>
use-ssl = true
-
+<%- end -%>
#Set Json Rpc decoder max frame length value. If the OVSDB node contains large configurations
#that can cause connection related issue while reading the configuration from the OVSDB node
#database. Increasing the max frame lenge helps resolve the issue. Please see following bug