- Move to using log4j2
2018-02-26 Release 8.0.1
- Fix ODL listening on default port when alternate port specified
+2018-03-05 Release 8.1.0
+- Configure Java Options via karaf instead of Systemd
match => '^featuresBoot=.*$',
}
+ # Modify karaf to include Java options
+ file_line {'Karaf Java Options':
+ ensure => present,
+ path => '/opt/opendaylight/bin/karaf',
+ line => "JAVA_OPTS=${opendaylight::java_opts}",
+ match => '^JAVA_OPTS=.*$',
+ after => '^PROGNAME=.*$'
+ }
+
file { 'org.ops4j.pax.web.cfg':
ensure => file,
path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
ensure => present,
}
- if $::osfamily == 'RedHat' {
- # Configure the systemd file with Java options
- file_line { 'java_options_systemd':
- ensure => present,
- path => '/usr/lib/systemd/system/opendaylight.service',
- line => "Environment=_JAVA_OPTIONS=\'${::opendaylight::java_opts}\'",
- match => '^Environment.*',
- after => 'ExecStart=/opt/opendaylight/bin/start',
- require => Package['opendaylight'],
- }
- ~> exec {'reload_systemd_units':
- command => 'systemctl daemon-reload',
- path => '/bin',
- refreshonly => true,
- }
- }
}
{
"name": "opendaylight-opendaylight",
- "version": "8.0.1",
+ "version": "8.1.0",
"author": "Daniel Farrell",
"summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
"license": "BSD-2-Clause",
#
# Tests that are common to all possible configurations
-def generic_tests()
+def generic_tests(options = {})
+ java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
+
# Confirm that module compiles
it { should compile }
it { should compile.with_all_deps }
'group' => 'odl',
)
}
+
+ it {
+ should contain_file_line('Karaf Java Options').with(
+ 'ensure' => 'present',
+ 'path' => '/opt/opendaylight/bin/karaf',
+ 'line' => "JAVA_OPTS=#{java_opts}",
+ 'match' => '^JAVA_OPTS=.*$',
+ 'after' => '^PROGNAME=.*$'
+ )
+ }
+
end
# Shared tests that specialize in testing log file size and rollover
def rpm_install_tests(options = {})
# Extract params
rpm_repo = options.fetch(:rpm_repo, 'https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel')
- java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
+
# Default to CentOS 7 Yum repo URL
'ensure' => 'present',
)
}
-
- it {
- should contain_file_line('java_options_systemd').with(
- 'ensure' => 'present',
- 'path' => '/usr/lib/systemd/system/opendaylight.service',
- 'line' => "Environment=_JAVA_OPTIONS=\'#{java_opts}\'",
- 'after' => 'ExecStart=/opt/opendaylight/bin/start',
- )
- }
end
def deb_install_tests(options = {})
# Shared function that handles generic validations
# These should be common for all odl class param combos
-def generic_validations()
+def generic_validations(options = {})
+ java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
+
# Verify ODL's directory
describe file('/opt/opendaylight/') do
it { should be_directory }
it { should be_grouped_into 'odl' }
end
+ # Should contain karaf file with Java options set
+ describe file('/opt/opendaylight/bin/karaf') do
+ it { should be_file }
+ it { should be_owned_by 'odl' }
+ it { should be_grouped_into 'odl' }
+ its(:content) { should match /^JAVA_OPTS=#{java_opts}$/ }
+ end
+
# Should contain ODL NB port config file
describe file('/opt/opendaylight/etc/jetty.xml') do
it { should be_file }