Add rcp_transport parameter for conductor

When Ironic Conductor requires optimizations over WAN, like some Edge
computing cases, allow configuring its [DEFAULT] rpc_transport setting.
F.e. rpc_transport may be set to 'json-rpc' for Ironic conductor
instances running at the edge sites, when the used messaging broker
should not be stretched over WAN. For such cases, this option also
plays nicely alongside the [conductor] conductor_group setting.

Related-Blueprint: undercloud-minion

Change-Id: Iad2f73f730315e8b3f0d5d809458626c9ebc890e
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2019-05-14 14:16:07 +02:00
parent b50b6a085a
commit 1e588cab27
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|