Merge "Add rcp_transport parameter for conductor"

This commit is contained in:
Zuul 2019-05-16 10:00:13 +00:00 committed by Gerrit Code Review
commit aadb6975a9
3 changed files with 25 additions and 0 deletions

View File

@ -52,6 +52,11 @@
# (optional) Seconds to wait for a response from a call. (integer value)
# Defaults to $::os_service_default.
#
# [*rpc_transport*]
# (optional) Defines a remote procedure call transport between conductor and
# API processes, such as using a messaging broker or JSON RPC.
# Defaults to $::os_service_default
#
# [*control_exchange*]
# (optional) What RPC queue/exchange to use (string value)
# Defaults to $::os_service_default
@ -266,6 +271,7 @@ class ironic (
$control_exchange = $::os_service_default,
$executor_thread_pool_size = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$rpc_transport = $::os_service_default,
$default_transport_url = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
@ -341,6 +347,7 @@ class ironic (
'DEFAULT/default_resource_class': value => $default_resource_class;
'DEFAULT/notification_level': value => $notification_level;
'DEFAULT/versioned_notifications_topics': value => $versioned_notifications_topics;
'DEFAULT/rpc_transport': value => $rpc_transport;
}
if $sync_db {

View File

@ -0,0 +1,5 @@
---
features:
- |
Adds ``ironic::rpc_transport`` parameter to define remote
procedure call transport between conductor and API processes.

View File

@ -105,6 +105,7 @@ describe 'ironic' do
is_expected.to contain_ironic_config('DEFAULT/my_ip').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/executor_thread_pool_size').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/rpc_transport').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_ironic_config('DEFAULT/default_resource_class').with_value('<SERVICE DEFAULT>')
@ -250,6 +251,18 @@ describe 'ironic' do
end
end
shared_examples_for 'oslo messaging remote procedure call' do
context 'with overridden rpc parameters' do
before { params.merge!(
:rpc_transport => 'pigeons',
:rpc_response_timeout => '3628800',
) }
it { is_expected.to contain_ironic_config('DEFAULT/rpc_transport').with_value('pigeons') }
it { is_expected.to contain_ironic_config('DEFAULT/rpc_response_timeout').with_value('3628800') }
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|