INTPAK-140: Fixes always listening on default port 76/68776/3
authorTim Rozet <trozet@redhat.com>
Mon, 26 Feb 2018 16:17:04 +0000 (11:17 -0500)
committerTim Rozet <trozet@redhat.com>
Mon, 26 Feb 2018 19:03:09 +0000 (14:03 -0500)
Pax config file was not being configured with the specified rest port.

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

index 7fa374be9a0d5efda8f54a58cb0c003eace56d84..1dd2577449532da12acc35e4c36e7ab731e23c92 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -64,3 +64,5 @@
 - Update default REST API port to 8181
 2018-01-30 Release 8.0.0
 - Move to using log4j2
+2018-02-26 Release 8.0.1
+- Fix ODL listening on default port when alternate port specified
index 9837b4df93131f36192ba7cfe13814c88b915aa8..f41957bd7c17b4a2ab4d196259d14cdf72d1cab4 100644 (file)
@@ -187,6 +187,13 @@ class opendaylight::config {
     }
   }
 
+  file_line { 'set pax bind port':
+    ensure  => present,
+    path    => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
+    line    => "org.osgi.service.http.port = ${opendaylight::odl_rest_port}",
+    require => File['org.ops4j.pax.web.cfg']
+  }
+
   # Set any custom log levels
   $opendaylight::log_levels.each |$log_name, $logging_level| {
     $underscored_version = regsubst($log_name, '\.', '_', 'G')
index c4467cf77868a7f66fd6b7d599843da5902000b0..500e526ff6cc09885a0a291cc62ffd6ff3142811 100644 (file)
@@ -1,6 +1,6 @@
 {
     "name": "opendaylight-opendaylight",
-    "version": "8.0.0",
+    "version": "8.0.1",
     "author": "Daniel Farrell",
     "summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
     "license": "BSD-2-Clause",
index 5b580336af9421622bf4b74bb029b446ee3b5675..37d9b384226430ba535162cfb9b927bd43981338 100644 (file)
@@ -162,6 +162,15 @@ def odl_rest_port_tests(options = {})
       should_not contain_augeas('ODL REST IP')
     }
   end
+
+  it {
+    should contain_file_line('set pax bind port').with(
+        'ensure'  => 'present',
+        'path'    => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
+        'line'    => "org.osgi.service.http.port = #{odl_rest_port}",
+        'require' => 'File[org.ops4j.pax.web.cfg]'
+    )
+  }
 end
 
 def log_level_tests(options = {})
index d433f867e3152ac0a7b72709d426a1e09aeb27bd..8586519f3ebcf257b2c8b1a700b82fb3865d501a 100644 (file)
@@ -268,6 +268,13 @@ def port_config_validations(options = {})
     it { should be_grouped_into 'odl' }
     its(:content) { should match /Property name="jetty.port" default="#{odl_rest_port}"/ }
   end
+
+  describe file('/opt/opendaylight/etc/org.ops4j.pax.web.cfg') do
+    it { should be_file }
+    it { should be_owned_by 'odl' }
+    it { should be_grouped_into 'odl' }
+    its(:content) { should match /org.osgi.service.http.port = #{odl_rest_port}/ }
+  end
 end
 
 # Shared function for validations related to custom logging verbosity