Add support for [oslo_messaging_rabbit] enable_cancel_on_failover
Depends-on: https://review.opendev.org/928440 Change-Id: I784b70703aef13470d53efcd15c2bbf5089da945
This commit is contained in:
@@ -93,6 +93,11 @@
|
|||||||
# (Optional) Limit the number of memory bytes used by the quorum queue.
|
# (Optional) Limit the number of memory bytes used by the quorum queue.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*rabbit_enable_cancel_on_failover*]
|
||||||
|
# (Optional) Enable x-cancel-on-ha-failover flag so that rabbitmq server will
|
||||||
|
# cancel and notify consumers when queue is down.
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
|
#
|
||||||
# [*rabbit_retry_interval*]
|
# [*rabbit_retry_interval*]
|
||||||
# (Optional) How frequently to retry connecting with RabbitMQ.
|
# (Optional) How frequently to retry connecting with RabbitMQ.
|
||||||
# (integer value)
|
# (integer value)
|
||||||
@@ -325,72 +330,73 @@
|
|||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
class nova(
|
class nova(
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
$default_transport_url = $facts['os_service_default'],
|
$default_transport_url = $facts['os_service_default'],
|
||||||
$rpc_response_timeout = $facts['os_service_default'],
|
$rpc_response_timeout = $facts['os_service_default'],
|
||||||
$long_rpc_timeout = $facts['os_service_default'],
|
$long_rpc_timeout = $facts['os_service_default'],
|
||||||
$control_exchange = $facts['os_service_default'],
|
$control_exchange = $facts['os_service_default'],
|
||||||
$executor_thread_pool_size = $facts['os_service_default'],
|
$executor_thread_pool_size = $facts['os_service_default'],
|
||||||
$rabbit_use_ssl = $facts['os_service_default'],
|
$rabbit_use_ssl = $facts['os_service_default'],
|
||||||
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
|
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
|
||||||
$rabbit_heartbeat_rate = $facts['os_service_default'],
|
$rabbit_heartbeat_rate = $facts['os_service_default'],
|
||||||
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
|
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
|
||||||
$rabbit_qos_prefetch_count = $facts['os_service_default'],
|
$rabbit_qos_prefetch_count = $facts['os_service_default'],
|
||||||
$rabbit_ha_queues = $facts['os_service_default'],
|
$rabbit_ha_queues = $facts['os_service_default'],
|
||||||
$rabbit_quorum_queue = $facts['os_service_default'],
|
$rabbit_quorum_queue = $facts['os_service_default'],
|
||||||
$rabbit_transient_quorum_queue = $facts['os_service_default'],
|
$rabbit_transient_quorum_queue = $facts['os_service_default'],
|
||||||
$rabbit_quorum_delivery_limit = $facts['os_service_default'],
|
$rabbit_quorum_delivery_limit = $facts['os_service_default'],
|
||||||
$rabbit_quorum_max_memory_length = $facts['os_service_default'],
|
$rabbit_quorum_max_memory_length = $facts['os_service_default'],
|
||||||
$rabbit_quorum_max_memory_bytes = $facts['os_service_default'],
|
$rabbit_quorum_max_memory_bytes = $facts['os_service_default'],
|
||||||
$rabbit_retry_interval = $facts['os_service_default'],
|
$rabbit_enable_cancel_on_failover = $facts['os_service_default'],
|
||||||
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
$rabbit_retry_interval = $facts['os_service_default'],
|
||||||
$kombu_ssl_certfile = $facts['os_service_default'],
|
$kombu_ssl_ca_certs = $facts['os_service_default'],
|
||||||
$kombu_ssl_keyfile = $facts['os_service_default'],
|
$kombu_ssl_certfile = $facts['os_service_default'],
|
||||||
$kombu_ssl_version = $facts['os_service_default'],
|
$kombu_ssl_keyfile = $facts['os_service_default'],
|
||||||
$kombu_reconnect_delay = $facts['os_service_default'],
|
$kombu_ssl_version = $facts['os_service_default'],
|
||||||
$kombu_failover_strategy = $facts['os_service_default'],
|
$kombu_reconnect_delay = $facts['os_service_default'],
|
||||||
$kombu_compression = $facts['os_service_default'],
|
$kombu_failover_strategy = $facts['os_service_default'],
|
||||||
$amqp_durable_queues = $facts['os_service_default'],
|
$kombu_compression = $facts['os_service_default'],
|
||||||
$host = $facts['os_service_default'],
|
$amqp_durable_queues = $facts['os_service_default'],
|
||||||
$service_down_time = $facts['os_service_default'],
|
$host = $facts['os_service_default'],
|
||||||
$state_path = '/var/lib/nova',
|
$service_down_time = $facts['os_service_default'],
|
||||||
$lock_path = $::nova::params::lock_path,
|
$state_path = '/var/lib/nova',
|
||||||
$report_interval = $facts['os_service_default'],
|
$lock_path = $::nova::params::lock_path,
|
||||||
$periodic_fuzzy_delay = $facts['os_service_default'],
|
$report_interval = $facts['os_service_default'],
|
||||||
$rootwrap_config = '/etc/nova/rootwrap.conf',
|
$periodic_fuzzy_delay = $facts['os_service_default'],
|
||||||
Boolean $use_ssl = false,
|
$rootwrap_config = '/etc/nova/rootwrap.conf',
|
||||||
Array[String[1]] $enabled_ssl_apis = ['metadata', 'osapi_compute'],
|
Boolean $use_ssl = false,
|
||||||
$ca_file = undef,
|
Array[String[1]] $enabled_ssl_apis = ['metadata', 'osapi_compute'],
|
||||||
$cert_file = undef,
|
$ca_file = undef,
|
||||||
$key_file = undef,
|
$cert_file = undef,
|
||||||
Nova::SshKey $nova_public_key = undef,
|
$key_file = undef,
|
||||||
Nova::SshKey $nova_private_key = undef,
|
Nova::SshKey $nova_public_key = undef,
|
||||||
$ssl_only = $facts['os_service_default'],
|
Nova::SshKey $nova_private_key = undef,
|
||||||
$cert = $facts['os_service_default'],
|
$ssl_only = $facts['os_service_default'],
|
||||||
$key = $facts['os_service_default'],
|
$cert = $facts['os_service_default'],
|
||||||
$console_ssl_ciphers = $facts['os_service_default'],
|
$key = $facts['os_service_default'],
|
||||||
$console_ssl_minimum_version = $facts['os_service_default'],
|
$console_ssl_ciphers = $facts['os_service_default'],
|
||||||
$notification_transport_url = $facts['os_service_default'],
|
$console_ssl_minimum_version = $facts['os_service_default'],
|
||||||
$notification_driver = $facts['os_service_default'],
|
$notification_transport_url = $facts['os_service_default'],
|
||||||
$notification_topics = $facts['os_service_default'],
|
$notification_driver = $facts['os_service_default'],
|
||||||
$notification_format = $facts['os_service_default'],
|
$notification_topics = $facts['os_service_default'],
|
||||||
$notify_on_state_change = $facts['os_service_default'],
|
$notification_format = $facts['os_service_default'],
|
||||||
$ovsdb_connection = $facts['os_service_default'],
|
$notify_on_state_change = $facts['os_service_default'],
|
||||||
$upgrade_level_compute = $facts['os_service_default'],
|
$ovsdb_connection = $facts['os_service_default'],
|
||||||
$upgrade_level_conductor = $facts['os_service_default'],
|
$upgrade_level_compute = $facts['os_service_default'],
|
||||||
$upgrade_level_scheduler = $facts['os_service_default'],
|
$upgrade_level_conductor = $facts['os_service_default'],
|
||||||
$cpu_allocation_ratio = $facts['os_service_default'],
|
$upgrade_level_scheduler = $facts['os_service_default'],
|
||||||
$ram_allocation_ratio = $facts['os_service_default'],
|
$cpu_allocation_ratio = $facts['os_service_default'],
|
||||||
$disk_allocation_ratio = $facts['os_service_default'],
|
$ram_allocation_ratio = $facts['os_service_default'],
|
||||||
$initial_cpu_allocation_ratio = $facts['os_service_default'],
|
$disk_allocation_ratio = $facts['os_service_default'],
|
||||||
$initial_ram_allocation_ratio = $facts['os_service_default'],
|
$initial_cpu_allocation_ratio = $facts['os_service_default'],
|
||||||
$initial_disk_allocation_ratio = $facts['os_service_default'],
|
$initial_ram_allocation_ratio = $facts['os_service_default'],
|
||||||
Boolean $purge_config = false,
|
$initial_disk_allocation_ratio = $facts['os_service_default'],
|
||||||
$my_ip = $facts['os_service_default'],
|
Boolean $purge_config = false,
|
||||||
$dhcp_domain = $facts['os_service_default'],
|
$my_ip = $facts['os_service_default'],
|
||||||
$instance_name_template = $facts['os_service_default'],
|
$dhcp_domain = $facts['os_service_default'],
|
||||||
|
$instance_name_template = $facts['os_service_default'],
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$auth_strategy = undef,
|
$auth_strategy = undef,
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
include nova::deps
|
include nova::deps
|
||||||
@@ -524,6 +530,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa, ssh-ed25519.")
|
|||||||
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
|
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
|
||||||
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
|
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
|
||||||
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
|
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
|
||||||
|
enable_cancel_on_failover => $rabbit_enable_cancel_on_failover,
|
||||||
rabbit_retry_interval => $rabbit_retry_interval,
|
rabbit_retry_interval => $rabbit_retry_interval,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The new ``nova::rabbit_enable_cancel_on_failover`` parameter has been
|
||||||
|
added.
|
@@ -56,6 +56,7 @@ describe 'nova' do
|
|||||||
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
|
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
|
||||||
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
|
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
|
||||||
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
|
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
|
||||||
|
:enable_cancel_on_failover => '<SERVICE DEFAULT>',
|
||||||
:rabbit_retry_interval => '<SERVICE DEFAULT>',
|
:rabbit_retry_interval => '<SERVICE DEFAULT>',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__messaging__notifications('nova_config').with(
|
is_expected.to contain_oslo__messaging__notifications('nova_config').with(
|
||||||
@@ -99,55 +100,56 @@ describe 'nova' do
|
|||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
|
:default_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
|
||||||
:rpc_response_timeout => '30',
|
:rpc_response_timeout => '30',
|
||||||
:long_rpc_timeout => '1800',
|
:long_rpc_timeout => '1800',
|
||||||
:control_exchange => 'nova',
|
:control_exchange => 'nova',
|
||||||
:executor_thread_pool_size => 64,
|
:executor_thread_pool_size => 64,
|
||||||
:rabbit_use_ssl => true,
|
:rabbit_use_ssl => true,
|
||||||
:rabbit_heartbeat_timeout_threshold => '60',
|
:rabbit_heartbeat_timeout_threshold => '60',
|
||||||
:rabbit_heartbeat_rate => '10',
|
:rabbit_heartbeat_rate => '10',
|
||||||
:rabbit_heartbeat_in_pthread => true,
|
:rabbit_heartbeat_in_pthread => true,
|
||||||
:rabbit_qos_prefetch_count => 0,
|
:rabbit_qos_prefetch_count => 0,
|
||||||
:kombu_reconnect_delay => '5.0',
|
:kombu_reconnect_delay => '5.0',
|
||||||
:amqp_durable_queues => true,
|
:amqp_durable_queues => true,
|
||||||
:kombu_compression => 'gzip',
|
:kombu_compression => 'gzip',
|
||||||
:kombu_ssl_ca_certs => '/etc/ca.cert',
|
:kombu_ssl_ca_certs => '/etc/ca.cert',
|
||||||
:kombu_ssl_certfile => '/etc/certfile',
|
:kombu_ssl_certfile => '/etc/certfile',
|
||||||
:kombu_ssl_keyfile => '/etc/key',
|
:kombu_ssl_keyfile => '/etc/key',
|
||||||
:kombu_ssl_version => 'TLSv1',
|
:kombu_ssl_version => 'TLSv1',
|
||||||
:rabbit_ha_queues => true,
|
:rabbit_ha_queues => true,
|
||||||
:rabbit_quorum_queue => true,
|
:rabbit_quorum_queue => true,
|
||||||
:rabbit_transient_quorum_queue => true,
|
:rabbit_transient_quorum_queue => true,
|
||||||
:rabbit_quorum_delivery_limit => 3,
|
:rabbit_quorum_delivery_limit => 3,
|
||||||
:rabbit_quorum_max_memory_length => 5,
|
:rabbit_quorum_max_memory_length => 5,
|
||||||
:rabbit_quorum_max_memory_bytes => 1073741824,
|
:rabbit_quorum_max_memory_bytes => 1073741824,
|
||||||
:rabbit_retry_interval => '1',
|
:rabbit_enable_cancel_on_failover => false,
|
||||||
:lock_path => '/var/locky/path',
|
:rabbit_retry_interval => '1',
|
||||||
:state_path => '/var/lib/nova2',
|
:lock_path => '/var/locky/path',
|
||||||
:service_down_time => '60',
|
:state_path => '/var/lib/nova2',
|
||||||
:auth_strategy => 'foo',
|
:service_down_time => '60',
|
||||||
:ensure_package => '2012.1.1-15.el6',
|
:auth_strategy => 'foo',
|
||||||
:host => 'test-001.example.org',
|
:ensure_package => '2012.1.1-15.el6',
|
||||||
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
|
:host => 'test-001.example.org',
|
||||||
:notification_driver => 'ceilometer.compute.nova_notifier',
|
:notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673',
|
||||||
:notification_topics => 'openstack',
|
:notification_driver => 'ceilometer.compute.nova_notifier',
|
||||||
:notification_format => 'unversioned',
|
:notification_topics => 'openstack',
|
||||||
:report_interval => '10',
|
:notification_format => 'unversioned',
|
||||||
:periodic_fuzzy_delay => '61',
|
:report_interval => '10',
|
||||||
:ovsdb_connection => 'tcp:127.0.0.1:6640',
|
:periodic_fuzzy_delay => '61',
|
||||||
:upgrade_level_compute => '1.0.0',
|
:ovsdb_connection => 'tcp:127.0.0.1:6640',
|
||||||
:upgrade_level_conductor => '1.0.0',
|
:upgrade_level_compute => '1.0.0',
|
||||||
:upgrade_level_scheduler => '1.0.0',
|
:upgrade_level_conductor => '1.0.0',
|
||||||
:purge_config => false,
|
:upgrade_level_scheduler => '1.0.0',
|
||||||
:my_ip => '192.0.2.1',
|
:purge_config => false,
|
||||||
:ssl_only => true,
|
:my_ip => '192.0.2.1',
|
||||||
:cert => '/etc/ssl/private/snakeoil.pem',
|
:ssl_only => true,
|
||||||
:key => '/etc/ssl/certs/snakeoil.pem',
|
:cert => '/etc/ssl/private/snakeoil.pem',
|
||||||
:console_ssl_ciphers => 'kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES',
|
:key => '/etc/ssl/certs/snakeoil.pem',
|
||||||
:console_ssl_minimum_version => 'tlsv1_2',
|
:console_ssl_ciphers => 'kEECDH+aECDSA+AES:kEECDH+AES+aRSA:kEDH+aRSA+AES',
|
||||||
:dhcp_domain => 'foo',
|
:console_ssl_minimum_version => 'tlsv1_2',
|
||||||
:instance_name_template => 'instance-%08x',
|
:dhcp_domain => 'foo',
|
||||||
|
:instance_name_template => 'instance-%08x',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -195,6 +197,7 @@ describe 'nova' do
|
|||||||
:rabbit_quorum_delivery_limit => 3,
|
:rabbit_quorum_delivery_limit => 3,
|
||||||
:rabbit_quorum_max_memory_length => 5,
|
:rabbit_quorum_max_memory_length => 5,
|
||||||
:rabbit_quorum_max_memory_bytes => 1073741824,
|
:rabbit_quorum_max_memory_bytes => 1073741824,
|
||||||
|
:enable_cancel_on_failover => false,
|
||||||
:rabbit_retry_interval => '1',
|
:rabbit_retry_interval => '1',
|
||||||
)
|
)
|
||||||
is_expected.to contain_oslo__messaging__notifications('nova_config').with(
|
is_expected.to contain_oslo__messaging__notifications('nova_config').with(
|
||||||
|
Reference in New Issue
Block a user