Remove enable_l3 param 50/55650/1
authorDaniel Farrell <dfarrell@redhat.com>
Fri, 20 Jan 2017 16:04:35 +0000 (11:04 -0500)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 19 Apr 2017 19:18:40 +0000 (15:18 -0400)
New versions of ODL NetVirt enable this by default.

Change-Id: Ia1b782a4e87af787811e52969bd3e8a8ccbbd13e
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
README.markdown
manifests/config.pp
manifests/init.pp
manifests/params.pp
spec/acceptance/class_spec.rb
spec/classes/opendaylight_spec.rb
spec/spec_helper.rb
spec/spec_helper_acceptance.rb
templates/custom.properties.erb [deleted file]

index 5c2931d069bd79d61323a16f5f1b4ad16075860d..6a8a03600edecef21593d80a86f5c440590dc62d 100644 (file)
@@ -16,7 +16,6 @@
   - [RPM Repo](#rpm-repo)
   - [Ports](#ports)
   - [Log Verbosity](#log-verbosity)
-  - [Enabling ODL OVSDB L3](#enabling-odl-ovsdb-l3)
   - [Enabling ODL OVSDB HA](#enabling-odl-ovsdb-ha)
 5. [Reference ](#reference)
 6. [Limitations](#limitations)
@@ -203,16 +202,6 @@ class { 'opendaylight':
 }
 ```
 
-### Enabling ODL OVSDB L3
-
-To enable the ODL OVSDB L3, use the `enable_l3` flag. It's disabled by default.
-
-```puppet
-class { 'opendaylight':
-  enable_l3 => true,
-}
-```
-
 ### Enabling ODL OVSDB HA
 
 To enable ODL OVSDB HA, use the `enable_ha` flag. It's disabled by default.
@@ -329,32 +318,6 @@ org.opendaylight.ovsdb.lib | INFO
 
 The main log output file is `/opt/opendaylight/data/log/karaf.log`.
 
-##### `enable_l3`
-
-Enable or disable ODL OVSDB L3 forwarding.
-
-Default: `'no'`
-
-Valid options: The strings `'yes'` or `'no'` or boolean values `true` and `false`.
-
-The ODL OVSDB L3 config in `/opt/opendaylight/etc/custom.properties` is set to
-the value of the `enable_l3` param.
-
-A manifest like
-
-```puppet
-class { 'opendaylight':
-  enable_l3 => true,
-}
-```
-
-Would would result in
-
-```
-ovsdb.l3.fwd.enabled=yes
-ovsdb.l3.arp.responder.disabled=no
-```
-
 ##### `enable_ha`
 
 Enable or disable ODL OVSDB High Availablity.
index ed6d679108ca2f8d01e952a503b2007b87358b5a..afe52e8a035e047d3ad5b897f4a25571f9d55de8 100644 (file)
@@ -30,17 +30,6 @@ class opendaylight::config {
     content => template('opendaylight/jetty.xml.erb'),
   }
 
-  # Enable or disable ODL OVSDB ML2 L3 forwarding
-  file { 'custom.properties':
-    ensure  => file,
-    path    => '/opt/opendaylight/etc/custom.properties',
-    # Set user:group owners
-    owner   => 'odl',
-    group   => 'odl',
-    # Use a template to populate the content
-    content => template('opendaylight/custom.properties.erb'),
-  }
-
   # Set any custom log levels
   file { 'org.ops4j.pax.logging.cfg':
     ensure  => file,
index 87703941f8cffdb20e33b92f06a11d673e6b5695..d8d4df864f51639ad67f6a418eef70bfaa9da7c9 100644 (file)
@@ -23,9 +23,6 @@
 # [*unitfile_url*]
 #   OpenDaylight .service file to use for tarball installs. Defaults to one
 #   used by ODL RPM.
-# [*enable_l3*]
-#   Enable or disable ODL OVSDB ML2 L3 forwarding. Valid: true, false, 'yes'
-#   and 'no'.
 # [*log_levels*]
 #   Custom OpenDaylight logger verbosity configuration (TRACE, DEBUG, INFO, WARN, ERROR).
 # [*enable_ha*]
@@ -47,7 +44,6 @@ class opendaylight (
   $rpm_repo            = $::opendaylight::params::rpm_repo,
   $tarball_url         = $::opendaylight::params::tarball_url,
   $unitfile_url        = $::opendaylight::params::unitfile_url,
-  $enable_l3           = $::opendaylight::params::enable_l3,
   $log_levels          = $::opendaylight::params::log_levels,
   $enable_ha           = $::opendaylight::params::enable_ha,
   $ha_node_ips         = $::opendaylight::params::ha_node_ips,
index a2925ff75479211a9de31fa399c0db27c7e3c442..ce680c906b0fdba0fc9685ddbc72caa242d53fc5 100644 (file)
@@ -16,8 +16,6 @@ class opendaylight::params {
   $rpm_repo = 'opendaylight-5-testing'
   $tarball_url = ''
   $unitfile_url = 'https://github.com/dfarrell07/opendaylight-systemd/archive/master/opendaylight-unitfile.tar.gz'
-  $odl_rest_port = '8080'
-  $enable_l3 = 'no'
   $log_levels = {}
   $enable_ha = false
   $ha_node_ips = []
index 3b04ad3367e3cfe1e9787eecc3b765bbe9d09770..58fbdd7d9f2522b95f0e12ada61d011a12dae4a3 100644 (file)
@@ -122,46 +122,4 @@ describe 'opendaylight class' do
       log_level_validations(log_levels: custom_log_levels)
     end
   end
-
-  describe 'testing ODL OVSDB L3 config' do
-    context 'using enable_l3 default' do
-      # Call specialized helper fn to install OpenDaylight
-      install_odl
-
-      # Call specialized helper fn for ODL OVSDB L3 config validations
-      enable_l3_validations
-    end
-
-    context 'using "no" for enable_l3' do
-      # Call specialized helper fn to install OpenDaylight
-      install_odl(enable_l3: 'no')
-
-      # Call specialized helper fn for ODL OVSDB L3 config validations
-      enable_l3_validations(enable_l3: 'no')
-    end
-
-    context 'using "yes" for enable_l3' do
-      # Call specialized helper fn to install OpenDaylight
-      install_odl(enable_l3: 'yes')
-
-      # Call specialized helper fn for ODL OVSDB L3 config validations
-      enable_l3_validations(enable_l3: 'yes')
-    end
-
-    context 'using false for enable_l3' do
-      # Call specialized helper fn to install OpenDaylight
-      install_odl(enable_l3: false)
-
-      # Call specialized helper fn for ODL OVSDB L3 config validations
-      enable_l3_validations(enable_l3: false)
-    end
-
-    context 'using true for enable_l3' do
-      # Call specialized helper fn to install OpenDaylight
-      install_odl(enable_l3: true)
-
-      # Call specialized helper fn for ODL OVSDB L3 config validations
-      enable_l3_validations(enable_l3: true)
-    end
-  end
 end
index f05ac7313374bc6d4e6dc1ad32f62ad715f47ad9..73f9eddc05b873b5dd43c2aae01f353d23297e6e 100644 (file)
@@ -42,11 +42,6 @@ describe 'opendaylight' do
             # Note that this function is defined in spec_helper
             log_level_tests
 
-            # Run tests that specialize in checking ODL OVSDB L3 config
-            # NB: Only testing defaults here, specialized enabling L3 tests elsewhere
-            # Note that this function is defined in spec_helper
-            enable_l3_tests
-
             # Run tests that specialize in checking ODL OVSDB HA config
             # NB: Only testing defaults here, specialized enabling HA tests elsewhere
             # Note that this function is defined in spec_helper
@@ -106,11 +101,6 @@ describe 'opendaylight' do
             # Note that this function is defined in spec_helper
             log_level_tests
 
-            # Run tests that specialize in checking ODL OVSDB L3 config
-            # NB: Only testing defaults here, specialized enabling L3 tests elsewhere
-            # Note that this function is defined in spec_helper
-            enable_l3_tests
-
             # Run tests that specialize in checking ODL OVSDB HA config
             # NB: Only testing defaults here, specialized enabling HA tests elsewhere
             # Note that this function is defined in spec_helper
@@ -186,11 +176,6 @@ describe 'opendaylight' do
             # Note that this function is defined in spec_helper
             log_level_tests
 
-            # Run tests that specialize in checking ODL OVSDB L3 config
-            # NB: Only testing defaults here, specialized enabling L3 tests elsewhere
-            # Note that this function is defined in spec_helper
-            enable_l3_tests
-
             # Run tests that specialize in checking ODL OVSDB HA config
             # NB: Only testing defaults here, specialized enabling HA tests elsewhere
             # Note that this function is defined in spec_helper
@@ -446,113 +431,6 @@ describe 'opendaylight' do
     end
   end
 
-  # All OVSDB L3 enable/disable tests
-  describe 'OVSDB L3 enable/disable tests' do
-    # Non-OS-type tests assume CentOS 7
-    #   See issue #43 for reasoning:
-    #   https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
-    osfamily = 'RedHat'
-    operatingsystem = 'CentOS'
-    operatingsystemmajrelease = '7'
-    context 'using enable_l3 default' do
-      let(:facts) {{
-        :osfamily => osfamily,
-        :operatingsystem => operatingsystem,
-        :operatingsystemmajrelease => operatingsystemmajrelease,
-      }}
-
-      let(:params) {{ }}
-
-      # Run shared tests applicable to all supported OSs
-      # Note that this function is defined in spec_helper
-      generic_tests
-
-      # Run test that specialize in checking ODL OVSDB L3 config
-      # Note that this function is defined in spec_helper
-      enable_l3_tests
-    end
-
-    context 'using "no" for enable_l3' do
-      let(:facts) {{
-        :osfamily => osfamily,
-        :operatingsystem => operatingsystem,
-        :operatingsystemmajrelease => operatingsystemmajrelease,
-      }}
-
-      let(:params) {{
-        :enable_l3 => 'no',
-      }}
-
-      # Run shared tests applicable to all supported OSs
-      # Note that this function is defined in spec_helper
-      generic_tests
-
-      # Run test that specialize in checking ODL OVSDB L3 config
-      # Note that this function is defined in spec_helper
-      enable_l3_tests(enable_l3: 'no')
-    end
-
-    context 'using "yes" for enable_l3' do
-      let(:facts) {{
-        :osfamily => osfamily,
-        :operatingsystem => operatingsystem,
-        :operatingsystemmajrelease => operatingsystemmajrelease,
-      }}
-
-      let(:params) {{
-        :enable_l3 => 'yes',
-      }}
-
-      # Run shared tests applicable to all supported OSs
-      # Note that this function is defined in spec_helper
-      generic_tests
-
-      # Run test that specialize in checking ODL OVSDB L3 config
-      # Note that this function is defined in spec_helper
-      enable_l3_tests(enable_l3: 'yes')
-    end
-
-    context 'using false for enable_l3' do
-      let(:facts) {{
-        :osfamily => osfamily,
-        :operatingsystem => operatingsystem,
-        :operatingsystemmajrelease => operatingsystemmajrelease,
-      }}
-
-      let(:params) {{
-        :enable_l3 => false,
-      }}
-
-      # Run shared tests applicable to all supported OSs
-      # Note that this function is defined in spec_helper
-      generic_tests
-
-      # Run test that specialize in checking ODL OVSDB L3 config
-      # Note that this function is defined in spec_helper
-      enable_l3_tests(enable_l3: false)
-    end
-
-    context 'using true for enable_l3' do
-      let(:facts) {{
-        :osfamily => osfamily,
-        :operatingsystem => operatingsystem,
-        :operatingsystemmajrelease => operatingsystemmajrelease,
-      }}
-
-      let(:params) {{
-        :enable_l3 => true,
-      }}
-
-      # Run shared tests applicable to all supported OSs
-      # Note that this function is defined in spec_helper
-      generic_tests
-
-      # Run test that specialize in checking ODL OVSDB L3 config
-      # Note that this function is defined in spec_helper
-      enable_l3_tests(enable_l3: true)
-    end
-  end
-
   # All OVSDB HA enable/disable tests
   describe 'OVSDB HA enable/disable tests' do
     # Non-OS-type tests assume CentOS 7
index 659b636efb79766aa3a7e73574d5aed8f3d92d08..0cf284553350d76bf2bc71cba76190b311adbec5 100644 (file)
@@ -197,38 +197,6 @@ def log_level_tests(options = {})
   end
 end
 
-# Shared tests that specialize in testing enabling L3 via ODL OVSDB
-def enable_l3_tests(options = {})
-  # Extract params
-  # NB: This default value should be the same as one in opendaylight::params
-  # TODO: Remove this possible source of bugs^^
-  enable_l3 = options.fetch(:enable_l3, 'no')
-
-  if [true, 'yes'].include? enable_l3
-    # Confirm ODL OVSDB L3 is enabled
-    it {
-      should contain_file('custom.properties').with(
-        'ensure'      => 'file',
-        'path'        => '/opt/opendaylight/etc/custom.properties',
-        'owner'   => 'odl',
-        'group'   => 'odl',
-        'content'     => /^ovsdb.l3.fwd.enabled=yes\novsdb.l3.arp.responder.disabled=no/
-      )
-    }
-  elsif [false, 'no'].include? enable_l3
-    # Confirm ODL OVSDB L3 is disabled
-    it {
-      should contain_file('custom.properties').with(
-        'ensure'      => 'file',
-        'path'        => '/opt/opendaylight/etc/custom.properties',
-        'owner'   => 'odl',
-        'group'   => 'odl',
-        'content'     => /^ovsdb.l3.fwd.enabled=no/
-      )
-    }
-  end
-end
-
 def enable_ha_tests(options = {})
   # Extract params
   enable_ha = options.fetch(:enable_ha, false)
index da63f437f92556d398c0e40f596223d6e4fbcb76..ce56f4bbc8ed5ab6504d4fc3ac8f8441ed4f8a70 100644 (file)
@@ -62,7 +62,6 @@ def install_odl(options = {})
     ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management'])
   odl_rest_port = options.fetch(:odl_rest_port, 8080)
   log_levels = options.fetch(:log_levels, {})
-  enable_l3 = options.fetch(:enable_l3, 'no')
   enable_ha = options.fetch(:enable_ha, false)
   ha_node_ips = options.fetch(:ha_node_ips, [])
   ha_node_index = options.fetch(:ha_node_index, 0)
@@ -76,7 +75,6 @@ def install_odl(options = {})
       default_features => #{default_features},
       extra_features => #{extra_features},
       odl_rest_port=> #{odl_rest_port},
-      enable_l3=> #{enable_l3},
       enable_ha=> #{enable_ha},
       ha_node_ips=> #{ha_node_ips},
       ha_node_index=> #{ha_node_index},
@@ -162,13 +160,6 @@ def generic_validations()
     it { should be_grouped_into 'odl' }
   end
 
-  # Should contain ODL OVSDB L3 enable/disable config file
-  describe file('/opt/opendaylight/etc/custom.properties') do
-    it { should be_file }
-    it { should be_owned_by 'odl' }
-    it { should be_grouped_into 'odl' }
-  end
-
   if ['centos-7', 'centos-7-docker', 'fedora-22', 'fedora-23', 'fedora-23-docker'].include? ENV['RS_SET']
     # Validations for modern Red Hat family OSs
 
@@ -286,32 +277,6 @@ def log_level_validations(options = {})
   end
 end
 
-# Shared function for validations related to ODL OVSDB L3 config
-def enable_l3_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^^
-  enable_l3 = options.fetch(:enable_l3, 'no')
-
-  if [true, 'yes'].include? enable_l3
-    # Confirm ODL OVSDB L3 is enabled
-    describe file('/opt/opendaylight/etc/custom.properties') do
-      it { should be_file }
-      it { should be_owned_by 'odl' }
-      it { should be_grouped_into 'odl' }
-      its(:content) { should match /^ovsdb.l3.fwd.enabled=yes\novsdb.l3.arp.responder.disabled=no/ }
-    end
-  elsif [false, 'no'].include? enable_l3
-    # Confirm ODL OVSDB L3 is disabled
-    describe file('/opt/opendaylight/etc/custom.properties') do
-      it { should be_file }
-      it { should be_owned_by 'odl' }
-      it { should be_grouped_into 'odl' }
-      its(:content) { should match /^ovsdb.l3.fwd.enabled=no/ }
-    end
-  end
-end
-
 # Shared function for validations related to ODL OVSDB HA config
 def enable_ha_validations(options = {})
   # NB: This param default should match the one used by the opendaylight
diff --git a/templates/custom.properties.erb b/templates/custom.properties.erb
deleted file mode 100644 (file)
index a1f1ce6..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-# Extra packages to import from the boot class loader
-org.osgi.framework.system.packages.extra=org.apache.karaf.branding,sun.reflect,sun.reflect.misc,sun.misc,sun.nio.ch
-
-# https://bugs.eclipse.org/bugs/show_bug.cgi?id=325578
-# Extend the framework to avoid the resources to be presented with
-# a URL of type bundleresource: but to be presented as file:
-osgi.hook.configurators.include=org.eclipse.virgo.kernel.equinox.extensions.hooks.ExtensionsHookConfigurator
-
-# Embedded Tomcat configuration File
-org.eclipse.gemini.web.tomcat.config.path=configuration/tomcat-server.xml
-org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
-
-# Use Equinox as default OSGi Framework Implementation
-karaf.framework=equinox
-
-# Netconf startup configuration
-netconf.tcp.address=127.0.0.1
-netconf.tcp.port=8383
-
-netconf.tcp.client.address=127.0.0.1
-netconf.tcp.client.port=8383
-
-netconf.ssh.address=0.0.0.0
-netconf.ssh.port=1830
-# Use Linux style path
-netconf.ssh.pk.path = ./configuration/RSA.pk
-# Set security provider to BouncyCastle
-org.apache.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider
-
-
-netconf.config.persister.active=1
-
-netconf.config.persister.1.storageAdapterClass=org.opendaylight.controller.config.persist.storage.file.xml.XmlFileStorageAdapter
-netconf.config.persister.1.properties.fileStorage=etc/opendaylight/current/controller.currentconfig.xml
-netconf.config.persister.1.properties.numberOfBackups=1
-
-# logback configuration
-logback.configurationFile=configuration/logback.xml
-
-# Container configuration
-container.profile = Container
-
-# Connection manager configuration
-connection.scheme = ANY_CONTROLLER_ONE_MASTER
-
-# Open Flow related system parameters
-# TCP port on which the controller is listening (default 6633)
-# of.listenPort=6633
-# IP address of the controller (default: wild card)
-# of.address = 127.0.0.1
-# The time (in milliseconds) the controller will wait for a response after sending a Barrier Request or a Statistic Request message (default 2000 msec)
-# of.messageResponseTimer=2000
-# The switch liveness timeout value (default 60500 msec)
-# of.switchLivenessTimeout=60500
-# The size of the queue holding pending statistics requests (default 64). For large networks of n switches, it is recommended to set the queue size to n
-# of.statsQueueSize = 64
-# The flow statistics polling interval in second (default 10 sec)
-# of.flowStatsPollInterval=10
-# The port statistics polling interval in second (default 5 sec)
-# of.portStatsPollInterval=5
-# The description statistics polling interval in second (default 60 sec)
-# of.descStatsPollInterval=60
-# The table statistics polling interval in second (default 10 sec)
-# of.tableStatsPollInterval=10
-# The maximum number of asynchronous messages can be sent before sending a Barrier Request (default 100)
-# of.barrierMessagePriorCount=100
-# The interval which determines how often the discovery packets should be sent (default 300 sec)
-# of.discoveryInterval=300
-# The timeout multiple of discovery interval
-# of.discoveryTimeoutMultiple=2
-# For newly added ports, allow one more retry if the elapsed time exceeds this threshold (default 30 sec)
-# of.discoveryThreshold=30
-# The maximum number of ports handled in one discovery batch (default 512)
-# of.discoveryBatchMaxPorts=512
-
-# OVSDB configuration
-# ovsdb plugin supports both active and passive connections. It listens on port 6640 by default for Active connections.
-ovsdb.listenPort=6640
-
-# ovsdb creates Openflow nodes/bridges. This configuration configures the bridge's Openflow version.
-# default Openflow version = 1.0, we also support 1.3.
-# ovsdb.of.version=1.3
-
-# ovsdb can be configured with ml2 to perform l3 forwarding. The config below enables that functionality, which is
-# disabled by default.
-<% if [true, 'yes'].include? scope.lookupvar('opendaylight::enable_l3') -%>
-ovsdb.l3.fwd.enabled=yes
-ovsdb.l3.arp.responder.disabled=no
-<% elsif [false, 'no'].include? scope.lookupvar('opendaylight::enable_l3') -%>
-ovsdb.l3.fwd.enabled=no
-<% else -%>
-  <%- fail("Unexpected enable_l3 value: #{scope.lookupvar('opendaylight::enable_l3')}") -%>
-<% end -%>
-
-# ovsdb can be configured with ml2 to perform l3 forwarding. When used in that scenario, the mac address of the default
-# gateway --on the external subnet-- is expected to be resolved from its inet address. The config below overrides that
-# specific arp/neighDiscovery lookup.
-# ovsdb.l3gateway.mac=00:00:5E:00:02:01
-
-# TLS configuration
-# To enable TLS, set secureChannelEnabled=true and specify the location of controller Java KeyStore and TrustStore files.
-# The Java KeyStore contains controller's private key and certificate. The Java TrustStore contains the trusted certificate
-# entries, including switches' Certification Authority (CA) certificates. For example,
-# secureChannelEnabled=true
-# controllerKeyStore=./configuration/ctlKeyStore
-# controllerKeyStorePassword=xxxxxxxx (this password should match the password used for KeyStore generation and at least 6 characters)
-# controllerTrustStore=./configuration/ctlTrustStore
-# controllerTrustStorePassword=xxxxxxxx (this password should match the password used for TrustStore generation and at least 6 characters)
-
-secureChannelEnabled=false
-controllerKeyStore=
-controllerKeyStorePassword=
-controllerTrustStore=
-controllerTrustStorePassword=
-
-# User Manager configurations
-enableStrongPasswordCheck = false
-
-#Jolokia configurations
-#org.jolokia.listenForHttpService=false
-
-# Logging configuration for Tomcat-JUL logging
-java.util.logging.config.file=configuration/tomcat-logging.properties
-
-#Hosttracker hostsdb key scheme setting
-hosttracker.keyscheme=IP
-
-# LISP Flow Mapping configuration
-# Map-Register messages overwrite existing RLOC sets in EID-to-RLOC mappings (default: true)
-lisp.mappingOverwrite = true
-# Enable the Solicit-Map-Request (SMR) mechanism (default: true)
-lisp.smr = true
-# Choose policy for Explicit Locator Path (ELP) handling
-# There are three options:
-#   default: don't add or remove locator records, return mapping as-is
-#   both: keep the ELP, but add the next hop as a standalone non-LCAF locator with a lower priority
-#   replace: remove the ELP, add the next hop as a standalone non-LCAF locator
-lisp.elpPolicy = default
-