diff --git a/manifests/api.pp b/manifests/api.pp index c9d20289..94de4ef2 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -293,20 +293,21 @@ the future release. Please use trove::api::package_ensure instead.") } oslo::messaging::rabbit {'trove_config': - rabbit_hosts => $::trove::rabbit_hosts, - rabbit_host => $::trove::rabbit_host, - rabbit_port => $::trove::rabbit_port, - rabbit_ha_queues => $::trove::rabbit_ha_queues, - rabbit_userid => $::trove::rabbit_userid, - rabbit_password => $::trove::rabbit_password, - rabbit_virtual_host => $::trove::rabbit_virtual_host, - rabbit_use_ssl => $::trove::rabbit_use_ssl, - kombu_reconnect_delay => $::trove::kombu_reconnect_delay, - amqp_durable_queues => $::trove::amqp_durable_queues, - kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, - kombu_ssl_certfile => $::trove::kombu_ssl_certfile, - kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, - kombu_ssl_version => $::trove::kombu_ssl_version + rabbit_hosts => $::trove::rabbit_hosts, + rabbit_host => $::trove::rabbit_host, + rabbit_port => $::trove::rabbit_port, + rabbit_ha_queues => $::trove::rabbit_ha_queues, + rabbit_userid => $::trove::rabbit_userid, + rabbit_password => $::trove::rabbit_password, + rabbit_virtual_host => $::trove::rabbit_virtual_host, + rabbit_use_ssl => $::trove::rabbit_use_ssl, + kombu_reconnect_delay => $::trove::kombu_reconnect_delay, + kombu_failover_strategy => $::trove::kombu_failover_strategy, + amqp_durable_queues => $::trove::amqp_durable_queues, + kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, + kombu_ssl_certfile => $::trove::kombu_ssl_certfile, + kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, + kombu_ssl_version => $::trove::kombu_ssl_version } oslo::messaging::amqp { 'trove_config': diff --git a/manifests/conductor.pp b/manifests/conductor.pp index 938aed8d..2b32b30f 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -152,20 +152,21 @@ the future release. Please use trove::conductor::package_ensure instead.") } oslo::messaging::rabbit {'trove_conductor_config': - rabbit_hosts => $::trove::rabbit_hosts, - rabbit_host => $::trove::rabbit_host, - rabbit_port => $::trove::rabbit_port, - rabbit_ha_queues => $::trove::rabbit_ha_queues, - rabbit_userid => $::trove::rabbit_userid, - rabbit_password => $::trove::rabbit_password, - rabbit_virtual_host => $::trove::rabbit_virtual_host, - rabbit_use_ssl => $::trove::rabbit_use_ssl, - kombu_reconnect_delay => $::trove::kombu_reconnect_delay, - amqp_durable_queues => $::trove::amqp_durable_queues, - kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, - kombu_ssl_certfile => $::trove::kombu_ssl_certfile, - kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, - kombu_ssl_version => $::trove::kombu_ssl_version + rabbit_hosts => $::trove::rabbit_hosts, + rabbit_host => $::trove::rabbit_host, + rabbit_port => $::trove::rabbit_port, + rabbit_ha_queues => $::trove::rabbit_ha_queues, + rabbit_userid => $::trove::rabbit_userid, + rabbit_password => $::trove::rabbit_password, + rabbit_virtual_host => $::trove::rabbit_virtual_host, + rabbit_use_ssl => $::trove::rabbit_use_ssl, + kombu_reconnect_delay => $::trove::kombu_reconnect_delay, + kombu_failover_strategy => $::trove::kombu_failover_strategy, + amqp_durable_queues => $::trove::amqp_durable_queues, + kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, + kombu_ssl_certfile => $::trove::kombu_ssl_certfile, + kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, + kombu_ssl_version => $::trove::kombu_ssl_version } oslo::messaging::amqp { 'trove_conductor_config': diff --git a/manifests/guestagent.pp b/manifests/guestagent.pp index dbf55c64..9b870905 100644 --- a/manifests/guestagent.pp +++ b/manifests/guestagent.pp @@ -193,20 +193,21 @@ trove::control_exchange instead.") } oslo::messaging::rabbit {'trove_guestagent_config': - rabbit_hosts => $rabbit_hosts, - rabbit_host => $rabbit_host, - rabbit_port => $rabbit_port, - rabbit_use_ssl => $rabbit_use_ssl, - rabbit_ha_queues => $::trove::rabbit_ha_queues, - rabbit_userid => $::trove::rabbit_userid, - rabbit_password => $::trove::rabbit_password, - rabbit_virtual_host => $::trove::rabbit_virtual_host, - kombu_reconnect_delay => $::trove::kombu_reconnect_delay, - amqp_durable_queues => $::trove::amqp_durable_queues, - kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, - kombu_ssl_certfile => $::trove::kombu_ssl_certfile, - kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, - kombu_ssl_version => $::trove::kombu_ssl_version + rabbit_hosts => $rabbit_hosts, + rabbit_host => $rabbit_host, + rabbit_port => $rabbit_port, + rabbit_use_ssl => $rabbit_use_ssl, + rabbit_ha_queues => $::trove::rabbit_ha_queues, + rabbit_userid => $::trove::rabbit_userid, + rabbit_password => $::trove::rabbit_password, + rabbit_virtual_host => $::trove::rabbit_virtual_host, + kombu_reconnect_delay => $::trove::kombu_reconnect_delay, + kombu_failover_strategy => $::trove::kombu_failover_strategy, + amqp_durable_queues => $::trove::amqp_durable_queues, + kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, + kombu_ssl_certfile => $::trove::kombu_ssl_certfile, + kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, + kombu_ssl_version => $::trove::kombu_ssl_version } oslo::messaging::amqp { 'trove_guestagent_config': diff --git a/manifests/init.pp b/manifests/init.pp index f40bbef2..e48049c4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -78,6 +78,12 @@ # consumer cancel notification. # Defaults to $::os_service_default # +# [*kombu_failover_strategy*] +# (Optional) Determines how the next RabbitMQ node is chosen in case the one +# we are currently connected to becomes unavailable. Takes effect only if +# more than one RabbitMQ node is provided in config. (string value) +# Defaults to $::os_service_default +# # [*amqp_durable_queues*] # (optional) Define queues as "durable" to rabbitmq. # Defaults to $::os_service_default @@ -306,6 +312,7 @@ class trove( $kombu_ssl_keyfile = $::os_service_default, $kombu_ssl_version = $::os_service_default, $kombu_reconnect_delay = $::os_service_default, + $kombu_failover_strategy = $::os_service_default, $amqp_durable_queues = $::os_service_default, $amqp_server_request_prefix = $::os_service_default, $amqp_broadcast_prefix = $::os_service_default, diff --git a/manifests/taskmanager.pp b/manifests/taskmanager.pp index 8c87543a..a1a6f9be 100644 --- a/manifests/taskmanager.pp +++ b/manifests/taskmanager.pp @@ -207,20 +207,21 @@ the future release. Please use trove::default_neutron_networks instead.") } oslo::messaging::rabbit { 'trove_taskmanager_config': - rabbit_hosts => $::trove::rabbit_hosts, - rabbit_host => $::trove::rabbit_host, - rabbit_port => $::trove::rabbit_port, - rabbit_ha_queues => $::trove::rabbit_ha_queues, - rabbit_userid => $::trove::rabbit_userid, - rabbit_password => $::trove::rabbit_password, - rabbit_virtual_host => $::trove::rabbit_virtual_host, - rabbit_use_ssl => $::trove::rabbit_use_ssl, - kombu_reconnect_delay => $::trove::kombu_reconnect_delay, - amqp_durable_queues => $::trove::amqp_durable_queues, - kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, - kombu_ssl_certfile => $::trove::kombu_ssl_certfile, - kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, - kombu_ssl_version => $::trove::kombu_ssl_version + rabbit_hosts => $::trove::rabbit_hosts, + rabbit_host => $::trove::rabbit_host, + rabbit_port => $::trove::rabbit_port, + rabbit_ha_queues => $::trove::rabbit_ha_queues, + rabbit_userid => $::trove::rabbit_userid, + rabbit_password => $::trove::rabbit_password, + rabbit_virtual_host => $::trove::rabbit_virtual_host, + rabbit_use_ssl => $::trove::rabbit_use_ssl, + kombu_reconnect_delay => $::trove::kombu_reconnect_delay, + kombu_failover_strategy => $::trove::kombu_failover_strategy, + amqp_durable_queues => $::trove::amqp_durable_queues, + kombu_ssl_ca_certs => $::trove::kombu_ssl_ca_certs, + kombu_ssl_certfile => $::trove::kombu_ssl_certfile, + kombu_ssl_keyfile => $::trove::kombu_ssl_keyfile, + kombu_ssl_version => $::trove::kombu_ssl_version } oslo::messaging::amqp { 'trove_taskmanager_config': diff --git a/releasenotes/notes/add_rabbit_kombu_options-919c4f7279179e1b.yaml b/releasenotes/notes/add_rabbit_kombu_options-919c4f7279179e1b.yaml new file mode 100644 index 00000000..8ade1157 --- /dev/null +++ b/releasenotes/notes/add_rabbit_kombu_options-919c4f7279179e1b.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds the kombu_failover_strategy option for configuring oslo.messaging.rabbit. + This will determines how the next RabbitMQ node is chosen in case the one we + are currently connected to becomes unavailable. diff --git a/spec/classes/trove_api_spec.rb b/spec/classes/trove_api_spec.rb index 82e2c371..10794184 100644 --- a/spec/classes/trove_api_spec.rb +++ b/spec/classes/trove_api_spec.rb @@ -92,6 +92,7 @@ describe 'trove::api' do is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_userid').with_value('') is_expected.to contain_trove_config('oslo_messaging_rabbit/rabbit_password').with_value('') is_expected.to contain_trove_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_trove_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_trove_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_trove_config('ssl/cert_file').with_ensure('absent') is_expected.to contain_trove_config('ssl/key_file').with_ensure('absent') diff --git a/spec/classes/trove_conductor_spec.rb b/spec/classes/trove_conductor_spec.rb index b2eaa70d..122b67f8 100644 --- a/spec/classes/trove_conductor_spec.rb +++ b/spec/classes/trove_conductor_spec.rb @@ -39,6 +39,7 @@ describe 'trove::conductor' do is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_userid').with_value('') is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/rabbit_password').with_value('') is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_trove_conductor_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_trove_conductor_config('DEFAULT/trove_conductor_workers').with_value('8') is_expected.to contain_trove_conductor_config('profiler/enabled').with_value('') diff --git a/spec/classes/trove_guestagent_spec.rb b/spec/classes/trove_guestagent_spec.rb index 73734ffe..1ca0047d 100644 --- a/spec/classes/trove_guestagent_spec.rb +++ b/spec/classes/trove_guestagent_spec.rb @@ -44,6 +44,7 @@ describe 'trove::guestagent' do is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_userid').with_value('') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/rabbit_password').with_value('') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_trove_guestagent_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_trove_guestagent_config('DEFAULT/swift_url').with_value('') is_expected.to contain_trove_guestagent_config('DEFAULT/swift_service_type').with_value('') diff --git a/spec/classes/trove_taskmanager_spec.rb b/spec/classes/trove_taskmanager_spec.rb index 366b8408..df2681c4 100644 --- a/spec/classes/trove_taskmanager_spec.rb +++ b/spec/classes/trove_taskmanager_spec.rb @@ -75,6 +75,7 @@ describe 'trove::taskmanager' do is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_userid').with_value('') is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/rabbit_password').with_value('') is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('') + is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('') is_expected.to contain_trove_taskmanager_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') is_expected.to contain_oslo__messaging__rabbit('trove_taskmanager_config').with( :rabbit_use_ssl => '',