INTPAK-163 Fixes default ODL Java opts 61/71261/1
authorTim Rozet <trozet@redhat.com>
Tue, 24 Apr 2018 15:43:02 +0000 (11:43 -0400)
committerTim Rozet <trozet@redhat.com>
Tue, 24 Apr 2018 15:46:12 +0000 (11:46 -0400)
The previous way we were configuring Java options was preventing any
default Java options from being included when ODL started. These
included garbage collection and heap size settings.  This patch modifies
the behavior of specifying Java options to puppet-opendaylight to be in
addition to the default Java options provided by ODL.

Change-Id: Ia46a8b64842bf766543f18678e100f33778f2d76
Signed-off-by: Tim Rozet <trozet@redhat.com>
CHANGELOG
README.markdown
manifests/config.pp
metadata.json
spec/spec_helper.rb
spec/spec_helper_acceptance.rb

index 2a87e889daae577c94ded8e20fd955b15d4bd1d2..8688de688b6ca0a1c368750f3f415766868bda72 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -68,3 +68,5 @@
 - 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
+2018-04-24 Release 8.1.1
+- Fix Java Options to also include ODL/Karaf default options
index 5933cbb67aa557bfe0c59e8cacb4440b3b981e4c..e222072563378e58d8b288241ee42529dc60a2aa 100644 (file)
@@ -394,7 +394,8 @@ Valid options: A valid host name to a VPP node handling routing.
 
 ##### `java_opts`
 
-Specifies the Java options to run ODL with as a string.
+Specifies the Java options to run ODL with as a string. Note, these options
+are in addition to the default Java options set by the karaf/ODL boot scripts.
 
 Default: `'-Djava.net.preferIPv4Stack=true'`
 
index d6ad9eadd598fcd8d7372ce24deb4361ef0835d6..9560ff538153481672c1567911478516210c19f5 100644 (file)
@@ -23,8 +23,8 @@ class opendaylight::config {
   file_line {'Karaf Java Options':
     ensure => present,
     path   => '/opt/opendaylight/bin/karaf',
-    line   => "JAVA_OPTS=${opendaylight::java_opts}",
-    match  => '^JAVA_OPTS=.*$',
+    line   => "EXTRA_JAVA_OPTS=${opendaylight::java_opts}",
+    match  => '^EXTRA_JAVA_OPTS=.*$',
     after  => '^PROGNAME=.*$'
   }
 
index 11b019b9e7b25137b38adf6a353985216c3c0538..c4ead6c9734438c1b23ef0abefb3d381469ea7c3 100644 (file)
@@ -1,6 +1,6 @@
 {
     "name": "opendaylight-opendaylight",
-    "version": "8.1.0",
+    "version": "8.1.1",
     "author": "Daniel Farrell",
     "summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
     "license": "BSD-2-Clause",
index c34def9bdac9b50e59141bc07eca467a7f61c141..65107d8c5d8d48655e8b32e3dc298e047b1434bb 100644 (file)
@@ -66,8 +66,8 @@ def generic_tests(options = {})
     should contain_file_line('Karaf Java Options').with(
       'ensure' => 'present',
       'path'   => '/opt/opendaylight/bin/karaf',
-      'line'   => "JAVA_OPTS=#{java_opts}",
-      'match'  => '^JAVA_OPTS=.*$',
+      'line'   => "EXTRA_JAVA_OPTS=#{java_opts}",
+      'match'  => '^EXTRA_JAVA_OPTS=.*$',
       'after'  => '^PROGNAME=.*$'
     )
   }
index 79b0c5d1d3739b999119c987170acfab56f02dfa..941d9c691710bc6336ba640ede00027bcd282c5d 100644 (file)
@@ -166,7 +166,7 @@ def generic_validations(options = {})
     it { should be_file }
     it { should be_owned_by 'odl' }
     it { should be_grouped_into 'odl' }
-    its(:content) { should match /^JAVA_OPTS=#{java_opts}$/ }
+    its(:content) { should match /^EXTRA_JAVA_OPTS=#{java_opts}$/ }
   end
 
   # Should contain ODL NB port config file