diff --git a/manifests/notify/rabbitmq.pp b/manifests/notify/rabbitmq.pp index 69c20942..bd2a0c55 100644 --- a/manifests/notify/rabbitmq.pp +++ b/manifests/notify/rabbitmq.pp @@ -80,6 +80,11 @@ # (Optional) Limit the number of memory bytes used by the quorum queue. # 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_use_ssl*] # (Optional) Connect over SSL for RabbitMQ. (boolean value) # Defaults to $facts['os_service_default'] @@ -149,6 +154,7 @@ class glance::notify::rabbitmq( $rabbit_quorum_delivery_limit = $facts['os_service_default'], $rabbit_quorum_max_memory_length = $facts['os_service_default'], $rabbit_quorum_max_memory_bytes = $facts['os_service_default'], + $rabbit_enable_cancel_on_failover = $facts['os_service_default'], $rabbit_use_ssl = $facts['os_service_default'], $kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'], @@ -184,6 +190,7 @@ class glance::notify::rabbitmq( rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit, rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length, rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes, + enable_cancel_on_failover => $rabbit_enable_cancel_on_failover, } oslo::messaging::default { 'glance_api_config': diff --git a/releasenotes/notes/enable_cancel_on_failover-93236283513d91ba.yaml b/releasenotes/notes/enable_cancel_on_failover-93236283513d91ba.yaml new file mode 100644 index 00000000..681512a2 --- /dev/null +++ b/releasenotes/notes/enable_cancel_on_failover-93236283513d91ba.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``glance::notify::rabbit::rabbit_enable_cancel_on_failover`` + parameter has been added. diff --git a/spec/classes/glance_notify_rabbitmq_spec.rb b/spec/classes/glance_notify_rabbitmq_spec.rb index 491f3912..5e2bc3e3 100644 --- a/spec/classes/glance_notify_rabbitmq_spec.rb +++ b/spec/classes/glance_notify_rabbitmq_spec.rb @@ -23,6 +23,7 @@ describe 'glance::notify::rabbitmq' do :rabbit_quorum_delivery_limit => '', :rabbit_quorum_max_memory_length => '', :rabbit_quorum_max_memory_bytes => '', + :enable_cancel_on_failover => '', ) } it { is_expected.to contain_oslo__messaging__default('glance_api_config').with( @@ -57,6 +58,7 @@ describe 'glance::notify::rabbitmq' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :rabbit_enable_cancel_on_failover => false, :rabbit_use_ssl => true, :kombu_ssl_ca_certs => '/etc/ca.cert', :kombu_ssl_certfile => '/etc/certfile', @@ -91,6 +93,7 @@ describe 'glance::notify::rabbitmq' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :enable_cancel_on_failover => false, ) } it { is_expected.to contain_oslo__messaging__default('glance_api_config').with(