From f79bd4183ec5a11bae0d0e3b761dead54c280f1e Mon Sep 17 00:00:00 2001 From: hanish Date: Sun, 5 Aug 2018 22:38:44 +0530 Subject: [PATCH] Added ovsdb_connection parameter to nova configuration ovsdb_connection parameter is used by the osvif repo, this would be used in ovs-vsctl commands to reach remote ovsdb over tcp/ssl connection. Depends-On: https://review.openstack.org/#/c/589750/ Change-Id: I0cb78399a777e70ed7c1bf7225574bed146728e1 --- manifests/init.pp | 7 +++++++ .../add_ovsdb_connection_parameter-2f5ffa9e6e00ab42.yaml | 5 +++++ spec/classes/nova_init_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_ovsdb_connection_parameter-2f5ffa9e6e00ab42.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 3aa2e1111..aeac9c314 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -326,6 +326,11 @@ # exceptions in the nova API service. # Defaults to $::os_service_default # +# [*ovsdb_connection*] +# (optional) Sets the ovsdb connection string. This is used by os-vif +# to interact with openvswitch on the host. +# Defaults to $::os_service_default +# # [*cinder_catalog_info*] # (optional) Info to match when looking for cinder in the service # catalog. Format is: separated values of the form: @@ -514,6 +519,7 @@ class nova( $notify_on_api_faults = false, $notify_on_state_change = undef, $os_region_name = $::os_service_default, + $ovsdb_connection = $::os_service_default, $cinder_catalog_info = $::os_service_default, $upgrade_level_cells = $::os_service_default, $upgrade_level_cert = $::os_service_default, @@ -745,6 +751,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") nova_config { 'cinder/catalog_info': value => $cinder_catalog_info; 'os_vif_linux_bridge/use_ipv6': value => $use_ipv6; + 'DEFAULT/ovsdb_connection': value => $ovsdb_connection; 'notifications/notify_on_api_faults': value => $notify_on_api_faults_real; 'notifications/notification_format': value => $notification_format; # Following may need to be broken out to different nova services diff --git a/releasenotes/notes/add_ovsdb_connection_parameter-2f5ffa9e6e00ab42.yaml b/releasenotes/notes/add_ovsdb_connection_parameter-2f5ffa9e6e00ab42.yaml new file mode 100644 index 000000000..f5ff8febe --- /dev/null +++ b/releasenotes/notes/add_ovsdb_connection_parameter-2f5ffa9e6e00ab42.yaml @@ -0,0 +1,5 @@ +--- +features: + - Add support for configuring ``ovsdb_connection`` config + option, which can be used by ovs-vif repo in ovs-vsctl + commands to reach remote ovsdb over tcp/ssl. diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index 95f5460f4..72cb3faef 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -54,6 +54,7 @@ describe 'nova' do is_expected.to contain_nova_config('DEFAULT/rootwrap_config').with_value('/etc/nova/rootwrap.conf') is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10') is_expected.to contain_nova_config('os_vif_linux_bridge/use_ipv6').with_value('') + is_expected.to contain_nova_config('DEFAULT/ovsdb_connection').with_value('') is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('') is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('') is_expected.to contain_nova_config('DEFAULT/control_exchange').with_value('') @@ -96,6 +97,7 @@ describe 'nova' do :notify_on_api_faults => true, :report_interval => '60', :os_region_name => 'MyRegion', + :ovsdb_connection => 'tcp:127.0.0.1:6640', :use_ipv6 => true, :upgrade_level_cells => '1.0.0', :upgrade_level_cert => '1.0.0', @@ -176,6 +178,7 @@ describe 'nova' do is_expected.to contain_nova_config('notifications/notification_format').with_value('unversioned') is_expected.to contain_nova_config('notifications/notify_on_api_faults').with_value(true) is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('60') + is_expected.to contain_nova_config('DEFAULT/ovsdb_connection').with_value('tcp:127.0.0.1:6640') is_expected.to contain_nova_config('os_vif_linux_bridge/use_ipv6').with_value('true') is_expected.to contain_nova_config('cinder/os_region_name').with_value('MyRegion') is_expected.to contain_nova_config('DEFAULT/ssl_only').with_value(true)