- Fix opendaylight karaf log file rotation
2018-09-27 Release 8.4.2
- Bind OVSDB and OpenFlow addresses to specific IP
+2018-10-03 Release 8.4.3
+- Adds configuration for OVSDB inactivity probe timer
Valid options: `true`, `false`
+### `inactivity_probe`
+
+Configures inactivity probe timer when specified.
+
+Default: `undef`
+
+Valid options: An integer or string in milliseconds.
+
## Limitations
- Tested on CentOS 7 and Ubuntu 16.04.
}
}
+ # Configure inactivity probe
+ if $opendaylight::inactivity_probe {
+ file {'netvirt-elanmanager-config.xml':
+ ensure => file,
+ path => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml',
+ owner => 'odl',
+ group => 'odl',
+ content => template('opendaylight/netvirt-elanmanager-config.xml.erb')
+ }
+ }
+
# Set any custom log levels
$opendaylight::log_levels.each |$log_name, $logging_level| {
$underscored_version = regsubst($log_name, '\.', '_', 'G')
# [*stats_polling_enabled*]
# Enables statistics polling of OpenFlow entities like table, groups.
# Defaults to false
+# [*inactivity_probe*]
+# Time in millseconds before an inactivity probe is sent via OVSDB
+# to OVS. Defaults to undef.
#
# === Deprecated Parameters
#
$log_mechanism = $::opendaylight::params::log_mechanism,
$inherit_dscp_marking = $::opendaylight::params::inherit_dscp_marking,
$stats_polling_enabled = $::opendaylight::params::stats_polling_enabled,
+ $inactivity_probe = $::opendaylight::params::inactivity_probe,
) inherits ::opendaylight::params {
# Validate OS family
$log_mechanism = 'file'
$inherit_dscp_marking = false
$stats_polling_enabled = false
+ $inactivity_probe = undef
}
{
"name": "opendaylight-opendaylight",
- "version": "8.4.2",
+ "version": "8.4.3",
"author": "Daniel Farrell",
"summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
"license": "BSD-2-Clause",
generic_validations(odl_bind_ip: '127.0.0.1')
end
end
+
+ describe 'testing configuring inactivity probe' do
+ context 'with specifying inactivity probe timer' do
+ # Call specialized helper fn to install OpenDaylight
+ install_odl(inactivity_probe: 99999)
+
+ # Call specialized helper fn for probe validations
+ inactivity_probe_validations(inactivity_probe: 99999)
+ end
+ end
end
# Run test specific to log settings
log_settings(log_mechanism: 'console')
end
+
+ context 'setting inactivity probe' do
+ let(:facts) {{
+ :osfamily => osfamily,
+ :operatingsystem => operatingsystem,
+ :operatingsystemmajrelease => operatingsystemmajrelease,
+ }}
+
+ let(:params) {{
+ :inactivity_probe => 99999,
+ }}
+
+ # Run shared tests applicable to all supported OSs
+ # Note that this function is defined in spec_helper
+ generic_tests
+ end
end
# All OVSDB HA enable/disable tests
def generic_tests(options = {})
java_opts = options.fetch(:java_opts, '')
odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
+ inactivity_probe = options.fetch(:inactivity_probe, :undef)
# Confirm that module compiles
it { should compile }
)
}
+ unless inactivity_probe == :undef
+ it {
+ should contain_file('Configure inactivity probe timer').with(
+ 'ensure' => 'file',
+ 'path' => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml',
+ 'owner' => 'odl',
+ 'group' => 'odl',
+ 'content' => /<controller-inactivity-probe>#{inactivity_probe}<\/controller-inactivity-probe>/
+ )
+ }
+ end
+
end
# Shared tests that specialize in testing log file size and rollover
log_mechanism = options.fetch(:log_mechanism, 'file')
inherit_dscp_marking = options.fetch(:inherit_dscp_marking, false)
stats_polling_enabled = options.fetch(:stats_polling_enabled, false)
+ inactivity_probe = options.fetch(:inactivity_probe, :undef)
# Build script for consumption by Puppet apply
it 'should work idempotently with no errors' do
log_mechanism => #{log_mechanism},
inherit_dscp_marking => #{inherit_dscp_marking},
stats_polling_enabled => #{stats_polling_enabled},
+ inactivity_probe => #{inactivity_probe},
}
EOS
its(:content) { should match /is-statistics-polling-on=#{stats_polling_enabled}/ }
end
end
+
+# Shared function for validations related to inactivity probe
+def inactivity_probe_validations(options = {})
+ # NB: This param default should match the one used by the opendaylight
+ # class, which is defined in opendaylight::params
+ # TODO: Remove this possible source of bugs^^
+
+ inactivity_probe = options.fetch(:inactivity_probe, :undef)
+ unless inactivity_probe == :undef
+ describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml') do
+ it { should be_file }
+ it { should be_owned_by 'odl' }
+ it { should be_grouped_into 'odl' }
+ its(:content) { should match /<controller-inactivity-probe>#{inactivity_probe}/ }
+ end
+ end
+end
--- /dev/null
+<elanmanager-config xmlns="urn:opendaylight:netvirt:elan:config">
+ <controller-inactivity-probe><%= scope.lookupvar('opendaylight::inactivity_probe') %></controller-inactivity-probe>
+</elanmanager-config>