Merge "Add transport_url and rpc_response_timeout for oslo.messaging"

This commit is contained in:
Jenkins
2016-06-14 14:29:48 +00:00
committed by Gerrit Code Review
3 changed files with 38 additions and 2 deletions

View File

@@ -49,6 +49,16 @@
# (optional) If set, use this value for max_overflow with sqlalchemy.
# Defaults to: undef.
#
# [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call. (integer value)
# Defaults to $::os_service_default.
#
# [*rpc_backend*]
# (optional) The rpc backend implementation to use, can be:
# rabbit (for rabbitmq)
@@ -300,6 +310,12 @@
# 'key-data' }, where 'key-type' is one of (ssh-rsa, ssh-dsa, ssh-ecdsa) and
# 'key-data' is the contents of the private key file.
#
# [*notification_transport_url*]
# (optional) A URL representing the messaging driver to use for notifications
# and its full configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
#
# [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications.
# Value can be a string or a list.
@@ -398,6 +414,8 @@ class nova(
$database_max_retries = undef,
$database_retry_interval = undef,
$database_max_overflow = undef,
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$rpc_backend = $::os_service_default,
$image_service = 'nova.image.glance.GlanceImageService',
# these glance params should be optional
@@ -457,6 +475,7 @@ class nova(
$use_syslog = undef,
$use_stderr = undef,
$log_facility = undef,
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,
$notify_api_faults = false,
@@ -663,9 +682,15 @@ class nova(
}
}
oslo::messaging::default { 'nova_config':
transport_url => $default_transport_url,
rpc_response_timeout => $rpc_response_timeout,
}
oslo::messaging::notifications { 'nova_config':
driver => $notification_driver,
topics => $notification_topics,
transport_url => $notification_transport_url,
driver => $notification_driver,
topics => $notification_topics,
}
nova_config {

View File

@@ -0,0 +1,3 @@
---
features:
- Add oslo.messaging transport_url parameters via puppet-oslo resource

View File

@@ -59,6 +59,8 @@ 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('DEFAULT/use_ipv6').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('cinder/os_region_name').with_ensure('absent')
is_expected.to contain_nova_config('cinder/catalog_info').with('value' => 'volumev2:cinderv2:publicURL')
end
@@ -71,6 +73,8 @@ describe 'nova' do
{ :debug => true,
:log_dir => '/var/log/nova2',
:image_service => 'nova.image.local.LocalImageService',
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:rpc_response_timeout => '30',
:rpc_backend => 'rabbit',
:rabbit_host => 'rabbit',
:rabbit_userid => 'rabbit_user',
@@ -85,6 +89,7 @@ describe 'nova' do
:ensure_package => '2012.1.1-15.el6',
:memcached_servers => ['memcached01:11211', 'memcached02:11211'],
:host => 'test-001.example.org',
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
:notification_driver => 'ceilometer.compute.nova_notifier',
:notification_topics => 'openstack',
:notify_api_faults => true,
@@ -126,6 +131,7 @@ describe 'nova' do
it 'configures rabbit' do
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit')
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5673')
@@ -159,6 +165,8 @@ describe 'nova' do
is_expected.to contain_nova_config('DEFAULT/state_path').with_value('/var/lib/nova2')
is_expected.to contain_nova_config('oslo_concurrency/lock_path').with_value('/var/locky/path')
is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('120')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('30')
is_expected.to contain_nova_config('oslo_messaging_notifications/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673')
is_expected.to contain_nova_config('oslo_messaging_notifications/driver').with_value('ceilometer.compute.nova_notifier')
is_expected.to contain_nova_config('oslo_messaging_notifications/topics').with_value('openstack')
is_expected.to contain_nova_config('DEFAULT/notify_api_faults').with_value(true)