Requires: `ha_node_ips`, `ha_node_index`
-The ODL OVSDB Clustering and Jolokia XML for HA are configured and enabled.
+The ODL OVSDB Clustering XML for HA are configured and enabled.
##### `ha_node_ips`
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="jolokia-1.1.5">
- <feature name="feature-jolokia" version="1.1.5" install="auto">
- <bundle>mvn:org.jolokia/jolokia-osgi/1.1.5</bundle>
- </feature>
-</features>
$ha_node_count = count($::opendaylight::ha_node_ips)
if $::opendaylight::enable_ha {
if $ha_node_count >= 2 {
- # Configuration Jolokia XML for HA
- file { 'opendaylight/jolokia.xml':
- ensure => file,
- path => '/opt/opendaylight/deploy/jolokia.xml',
- # Set user:group owners
- owner => 'odl',
- group => 'odl',
- source => 'puppet:///modules/opendaylight/jolokia.xml',
- }
-
# Configure ODL OSVDB Clustering
$ha_node_ip_str = join($::opendaylight::ha_node_ips, ' ')
exec { 'Configure ODL OVSDB Clustering':
ha_node_count = ha_node_ips.size
if enable_ha
- # Confirm ODL OVSDB HA is enabled
- if ha_node_count >=2
- # Check for HA_NODE_COUNT >= 2
- it {
- should contain_file('opendaylight/jolokia.xml').with(
- 'ensure' => 'file',
- 'path' => '/opt/opendaylight/deploy/jolokia.xml',
- 'owner' => 'odl',
- 'group' => 'odl'
- )
- }
- else
- # Check for HA_NODE_COUNT < 2
- fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
- end
+ # Check for HA_NODE_COUNT < 2
+ fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
end
end
ha_node_count = ha_node_ips.size
if enable_ha
- # Confirm ODL OVSDB HA is enabled
- if ha_node_count >=2
- # Check for HA_NODE_COUNT >= 2
- describe file('/opt/opendaylight/deploy/jolokia.xml') do
- it { should be_file }
- it { should be_owned_by 'odl' }
- it { should be_grouped_into 'odl' }
- end
- else
- # Check for HA_NODE_COUNT < 2
- fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
- end
+ # Check for HA_NODE_COUNT < 2
+ fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
end
end