diff --git a/manifests/plugins/ovs/opendaylight.pp b/manifests/plugins/ovs/opendaylight.pp index c4bb04d26..50c18ad51 100644 --- a/manifests/plugins/ovs/opendaylight.pp +++ b/manifests/plugins/ovs/opendaylight.pp @@ -139,11 +139,15 @@ class neutron::plugins::ovs::opendaylight ( if $odl_ovsdb_iface =~ /^tcp/ { warning('TLS enabled but odl_ovsdb_iface set to tcp. Will override to ssl') $odl_ovsdb_iface_parsed = regsubst($odl_ovsdb_iface, '^tcp', 'ssl') + } else { + $odl_ovsdb_iface_parsed = $odl_ovsdb_iface } if $ovsdb_server_iface =~ /^ptcp/ { warning('TLS enabled but ovsdb_server_iface set to ptcp. Will override to pssl') $ovsdb_server_iface_parsed = regsubst($ovsdb_server_iface, '^ptcp', 'pssl') + } else { + $ovsdb_server_iface_parsed = $ovsdb_server_iface } if $odl_check_url =~ /^http:/ { diff --git a/releasenotes/notes/fix-odl-ovs-ssl-uri-5a8174ef6fd5a3d4.yaml b/releasenotes/notes/fix-odl-ovs-ssl-uri-5a8174ef6fd5a3d4.yaml new file mode 100644 index 000000000..4efaa8ec1 --- /dev/null +++ b/releasenotes/notes/fix-odl-ovs-ssl-uri-5a8174ef6fd5a3d4.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue with using TLS and specifying ovsdb_server_iface and + the odl_ovsdb_iface parameters with the plugins::ovs::opendaylight + class. diff --git a/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb b/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb index cb38e987c..b6dcf4811 100644 --- a/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb +++ b/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb @@ -150,7 +150,9 @@ describe 'neutron::plugins::ovs::opendaylight' do shared_examples_for 'with TLS enabled' do it 'configures OVS for ODL' do is_expected.to contain_exec('Add trusted cert: dummy.crt') - is_expected.to contain_exec('Set OVS Manager to OpenDaylight') + is_expected.to contain_exec('Set OVS Manager to OpenDaylight').with( + :command => "ovs-vsctl set-manager pssl:6639:127.0.0.1 ssl:127.0.0.1:6640" + ) is_expected.to contain_vs_config('other_config:local_ip') is_expected.not_to contain_vs_config('other_config:provider_mappings') is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')