diff --git a/manifests/init.pp b/manifests/init.pp index 232071d4..1fbd7a0c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -134,6 +134,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'] +# # [*kombu_ssl_ca_certs*] # (optional) SSL certification authority file (valid only if SSL enabled). # (string value) @@ -244,6 +249,7 @@ class ironic ( $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'], $kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'], $kombu_ssl_keyfile = $facts['os_service_default'], @@ -335,6 +341,7 @@ class ironic ( 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::notifications { 'ironic_config': diff --git a/manifests/inspector.pp b/manifests/inspector.pp index 95d55885..5f48a389 100644 --- a/manifests/inspector.pp +++ b/manifests/inspector.pp @@ -274,6 +274,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'] +# # [*kombu_ssl_ca_certs*] # (optional) SSL certification authority file (valid only if SSL enabled). # (string value) @@ -371,6 +376,7 @@ class ironic::inspector ( $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'], $kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'], $kombu_ssl_keyfile = $facts['os_service_default'], @@ -515,6 +521,7 @@ class ironic::inspector ( 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, } # Install package diff --git a/releasenotes/notes/enable_cancel_on_failover-96cdd8cbe892f837.yaml b/releasenotes/notes/enable_cancel_on_failover-96cdd8cbe892f837.yaml new file mode 100644 index 00000000..a1f1e66d --- /dev/null +++ b/releasenotes/notes/enable_cancel_on_failover-96cdd8cbe892f837.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new ``ironic::rabbit_enable_cancel_on_failover`` parameter and + the new ``ironic::inspector::rabbit_enable_cancel_on_failover`` parameter + have been added. diff --git a/spec/classes/ironic_init_spec.rb b/spec/classes/ironic_init_spec.rb index 9a958d13..08f82079 100644 --- a/spec/classes/ironic_init_spec.rb +++ b/spec/classes/ironic_init_spec.rb @@ -98,6 +98,7 @@ describe 'ironic' do :rabbit_quorum_delivery_limit => '', :rabbit_quorum_max_memory_length => '', :rabbit_quorum_max_memory_bytes => '', + :enable_cancel_on_failover => '', ) is_expected.to contain_oslo__messaging__notifications('ironic_config').with( :transport_url => '', @@ -138,6 +139,7 @@ describe 'ironic' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :rabbit_enable_cancel_on_failover => false, :notification_transport_url => 'rabbit://rabbit_user:password@localhost:5673', :notification_driver => 'messagingv2', :notification_topics => 'openstack', @@ -182,6 +184,7 @@ describe 'ironic' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :enable_cancel_on_failover => false, ) is_expected.to contain_oslo__messaging__notifications('ironic_config').with( :transport_url => 'rabbit://rabbit_user:password@localhost:5673', diff --git a/spec/classes/ironic_inspector_spec.rb b/spec/classes/ironic_inspector_spec.rb index 3c411550..0209676d 100644 --- a/spec/classes/ironic_inspector_spec.rb +++ b/spec/classes/ironic_inspector_spec.rb @@ -150,6 +150,7 @@ describe 'ironic::inspector' do :rabbit_quorum_delivery_limit => '', :rabbit_quorum_max_memory_length => '', :rabbit_quorum_max_memory_bytes => '', + :enable_cancel_on_failover => '', ) end @@ -264,6 +265,7 @@ describe 'ironic::inspector' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :rabbit_enable_cancel_on_failover => false, ) end it 'should replace default parameter with new value' do @@ -301,6 +303,7 @@ describe 'ironic::inspector' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :enable_cancel_on_failover => false, ) end