Skip to content

Commit

Permalink
Merge pull request #1030 from LangJV/master
Browse files Browse the repository at this point in the history
Add quorum queue auto-reconciliation parameter support
  • Loading branch information
wyardley authored Dec 17, 2024
2 parents 14e0306 + 539e45f commit c7e6206
Show file tree
Hide file tree
Showing 5 changed files with 258 additions and 89 deletions.
54 changes: 54 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ The following parameters are available in the `rabbitmq` class:
* [`package_name`](#-rabbitmq--package_name)
* [`port`](#-rabbitmq--port)
* [`python_package`](#-rabbitmq--python_package)
* [`quorum_membership_reconciliation_enabled`](#-rabbitmq--quorum_membership_reconciliation_enabled)
* [`quorum_membership_reconciliation_auto_remove`](#-rabbitmq--quorum_membership_reconciliation_auto_remove)
* [`quorum_membership_reconciliation_interval`](#-rabbitmq--quorum_membership_reconciliation_interval)
* [`quorum_membership_reconciliation_trigger_interval`](#-rabbitmq--quorum_membership_reconciliation_trigger_interval)
* [`quorum_membership_reconciliation_target_group_size`](#-rabbitmq--quorum_membership_reconciliation_target_group_size)
* [`repos_ensure`](#-rabbitmq--repos_ensure)
* [`service_ensure`](#-rabbitmq--service_ensure)
* [`service_manage`](#-rabbitmq--service_manage)
Expand Down Expand Up @@ -809,6 +814,55 @@ Name of the package required by rabbitmqadmin.

Default value: `'python'`

##### <a name="-rabbitmq--quorum_membership_reconciliation_enabled"></a>`quorum_membership_reconciliation_enabled`

Data type: `Optional[Boolean]`

Enables or disables continuous membership reconciliation.
This REQUIRES RabbitMQ 3.13 or higher to be set to true. More information on this configuration
can be found here: https://www.rabbitmq.com/docs/quorum-queues

Default value: `undef`

##### <a name="-rabbitmq--quorum_membership_reconciliation_auto_remove"></a>`quorum_membership_reconciliation_auto_remove`

Data type: `Optional[Boolean]`

Enables or disables automatic removal of member nodes that are no longer part of the cluster,
but still a member of the quorum queue.
Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.

Default value: `undef`

##### <a name="-rabbitmq--quorum_membership_reconciliation_interval"></a>`quorum_membership_reconciliation_interval`

Data type: `Optional[Integer]`

The default evaluation interval in milliseconds.
Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.

Default value: `undef`

##### <a name="-rabbitmq--quorum_membership_reconciliation_trigger_interval"></a>`quorum_membership_reconciliation_trigger_interval`

Data type: `Optional[Integer]`

The reconciliation delay in milliseconds, used when a trigger event occurs,
for example, a node is added or removed from the cluster or an applicable policy changes.
This delay will be applied only once, then the regular interval will be used again.
Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.

Default value: `undef`

##### <a name="-rabbitmq--quorum_membership_reconciliation_target_group_size"></a>`quorum_membership_reconciliation_target_group_size`

Data type: `Optional[Integer]`

Controls the target group size for a quorum queue
Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.

Default value: `undef`

##### <a name="-rabbitmq--repos_ensure"></a>`repos_ensure`

Data type: `Boolean`
Expand Down
181 changes: 93 additions & 88 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,94 +3,99 @@
#
# @api private
class rabbitmq::config {
$admin_enable = $rabbitmq::admin_enable
$management_enable = $rabbitmq::management_enable
$use_config_file_for_plugins = $rabbitmq::use_config_file_for_plugins
$plugins = $rabbitmq::plugins
$cluster_node_type = $rabbitmq::cluster_node_type
$cluster_nodes = $rabbitmq::cluster_nodes
$config = $rabbitmq::config
$config_cluster = $rabbitmq::config_cluster
$config_cowboy_opts = $rabbitmq::config_cowboy_opts
$config_path = $rabbitmq::config_path
$config_ranch = $rabbitmq::config_ranch
$config_stomp = $rabbitmq::config_stomp
$stomp_ensure = $rabbitmq::stomp_ensure
$config_shovel = $rabbitmq::config_shovel
$config_shovel_statics = $rabbitmq::config_shovel_statics
$default_user = $rabbitmq::default_user
$default_pass = $rabbitmq::default_pass
$env_config = $rabbitmq::env_config
$env_config_path = $rabbitmq::env_config_path
$erlang_cookie = $rabbitmq::erlang_cookie
$interface = $rabbitmq::interface
$management_port = $rabbitmq::management_port
$management_ssl = $rabbitmq::management_ssl
$management_hostname = $rabbitmq::management_hostname
$node_ip_address = $rabbitmq::node_ip_address
$rabbitmq_user = $rabbitmq::rabbitmq_user
$rabbitmq_group = $rabbitmq::rabbitmq_group
$rabbitmq_home = $rabbitmq::rabbitmq_home
$port = $rabbitmq::port
$tcp_keepalive = $rabbitmq::tcp_keepalive
$tcp_backlog = $rabbitmq::tcp_backlog
$tcp_sndbuf = $rabbitmq::tcp_sndbuf
$tcp_recbuf = $rabbitmq::tcp_recbuf
$heartbeat = $rabbitmq::heartbeat
$service_name = $rabbitmq::service_name
$ssl = $rabbitmq::ssl
$ssl_only = $rabbitmq::ssl_only
$ssl_cacert = $rabbitmq::ssl_cacert
$ssl_cert = $rabbitmq::ssl_cert
$ssl_key = $rabbitmq::ssl_key
$ssl_depth = $rabbitmq::ssl_depth
$ssl_cert_password = $rabbitmq::ssl_cert_password
$ssl_port = $rabbitmq::ssl_port
$ssl_interface = $rabbitmq::ssl_interface
$ssl_management_port = $rabbitmq::ssl_management_port
$ssl_management_cacert = $rabbitmq::ssl_management_cacert
$ssl_management_cert = $rabbitmq::ssl_management_cert
$ssl_management_key = $rabbitmq::ssl_management_key
$ssl_management_verify = $rabbitmq::ssl_management_verify
$ssl_management_fail_if_no_peer_cert = $rabbitmq::ssl_management_fail_if_no_peer_cert
$ssl_stomp_port = $rabbitmq::ssl_stomp_port
$ssl_verify = $rabbitmq::ssl_verify
$ssl_fail_if_no_peer_cert = $rabbitmq::ssl_fail_if_no_peer_cert
$ssl_client_renegotiation = $rabbitmq::ssl_client_renegotiation
$ssl_secure_renegotiate = $rabbitmq::ssl_secure_renegotiate
$ssl_reuse_sessions = $rabbitmq::ssl_reuse_sessions
$ssl_honor_cipher_order = $rabbitmq::ssl_honor_cipher_order
$ssl_dhfile = $rabbitmq::ssl_dhfile
$ssl_versions = $rabbitmq::ssl_versions
$ssl_ciphers = $rabbitmq::ssl_ciphers
$ssl_crl_check = $rabbitmq::ssl_crl_check
$ssl_crl_cache_hash_dir = $rabbitmq::ssl_crl_cache_hash_dir
$ssl_crl_cache_http_timeout = $rabbitmq::ssl_crl_cache_http_timeout
$stomp_port = $rabbitmq::stomp_port
$stomp_ssl_only = $rabbitmq::stomp_ssl_only
$ldap_auth = $rabbitmq::ldap_auth
$ldap_server = $rabbitmq::ldap_server
$ldap_user_dn_pattern = $rabbitmq::ldap_user_dn_pattern
$ldap_other_bind = $rabbitmq::ldap_other_bind
$ldap_use_ssl = $rabbitmq::ldap_use_ssl
$ldap_port = $rabbitmq::ldap_port
$ldap_log = $rabbitmq::ldap_log
$ldap_config_variables = $rabbitmq::ldap_config_variables
$wipe_db_on_cookie_change = $rabbitmq::wipe_db_on_cookie_change
$config_variables = $rabbitmq::config_variables
$config_kernel_variables = $rabbitmq::config_kernel_variables
$config_management_variables = $rabbitmq::config_management_variables
$config_additional_variables = $rabbitmq::config_additional_variables
$auth_backends = $rabbitmq::auth_backends
$cluster_partition_handling = $rabbitmq::cluster_partition_handling
$file_limit = $rabbitmq::file_limit
$oom_score_adj = $rabbitmq::oom_score_adj
$collect_statistics_interval = $rabbitmq::collect_statistics_interval
$ipv6 = $rabbitmq::ipv6
$inetrc_config = $rabbitmq::inetrc_config
$inetrc_config_path = $rabbitmq::inetrc_config_path
$ssl_erl_dist = $rabbitmq::ssl_erl_dist
$loopback_users = $rabbitmq::loopback_users
$admin_enable = $rabbitmq::admin_enable
$management_enable = $rabbitmq::management_enable
$use_config_file_for_plugins = $rabbitmq::use_config_file_for_plugins
$plugins = $rabbitmq::plugins
$cluster_node_type = $rabbitmq::cluster_node_type
$cluster_nodes = $rabbitmq::cluster_nodes
$config = $rabbitmq::config
$config_cluster = $rabbitmq::config_cluster
$config_cowboy_opts = $rabbitmq::config_cowboy_opts
$config_path = $rabbitmq::config_path
$config_ranch = $rabbitmq::config_ranch
$config_stomp = $rabbitmq::config_stomp
$stomp_ensure = $rabbitmq::stomp_ensure
$config_shovel = $rabbitmq::config_shovel
$config_shovel_statics = $rabbitmq::config_shovel_statics
$default_user = $rabbitmq::default_user
$default_pass = $rabbitmq::default_pass
$env_config = $rabbitmq::env_config
$env_config_path = $rabbitmq::env_config_path
$erlang_cookie = $rabbitmq::erlang_cookie
$interface = $rabbitmq::interface
$management_port = $rabbitmq::management_port
$management_ssl = $rabbitmq::management_ssl
$management_hostname = $rabbitmq::management_hostname
$node_ip_address = $rabbitmq::node_ip_address
$quorum_membership_reconciliation_enabled = $rabbitmq::quorum_membership_reconciliation_enabled
$quorum_membership_reconciliation_auto_remove = $rabbitmq::quorum_membership_reconciliation_auto_remove
$quorum_membership_reconciliation_interval = $rabbitmq::quorum_membership_reconciliation_interval
$quorum_membership_reconciliation_trigger_interval = $rabbitmq::quorum_membership_reconciliation_trigger_interval
$quorum_membership_reconciliation_target_group_size = $rabbitmq::quorum_membership_reconciliation_target_group_size
$rabbitmq_user = $rabbitmq::rabbitmq_user
$rabbitmq_group = $rabbitmq::rabbitmq_group
$rabbitmq_home = $rabbitmq::rabbitmq_home
$port = $rabbitmq::port
$tcp_keepalive = $rabbitmq::tcp_keepalive
$tcp_backlog = $rabbitmq::tcp_backlog
$tcp_sndbuf = $rabbitmq::tcp_sndbuf
$tcp_recbuf = $rabbitmq::tcp_recbuf
$heartbeat = $rabbitmq::heartbeat
$service_name = $rabbitmq::service_name
$ssl = $rabbitmq::ssl
$ssl_only = $rabbitmq::ssl_only
$ssl_cacert = $rabbitmq::ssl_cacert
$ssl_cert = $rabbitmq::ssl_cert
$ssl_key = $rabbitmq::ssl_key
$ssl_depth = $rabbitmq::ssl_depth
$ssl_cert_password = $rabbitmq::ssl_cert_password
$ssl_port = $rabbitmq::ssl_port
$ssl_interface = $rabbitmq::ssl_interface
$ssl_management_port = $rabbitmq::ssl_management_port
$ssl_management_cacert = $rabbitmq::ssl_management_cacert
$ssl_management_cert = $rabbitmq::ssl_management_cert
$ssl_management_key = $rabbitmq::ssl_management_key
$ssl_management_verify = $rabbitmq::ssl_management_verify
$ssl_management_fail_if_no_peer_cert = $rabbitmq::ssl_management_fail_if_no_peer_cert
$ssl_stomp_port = $rabbitmq::ssl_stomp_port
$ssl_verify = $rabbitmq::ssl_verify
$ssl_fail_if_no_peer_cert = $rabbitmq::ssl_fail_if_no_peer_cert
$ssl_client_renegotiation = $rabbitmq::ssl_client_renegotiation
$ssl_secure_renegotiate = $rabbitmq::ssl_secure_renegotiate
$ssl_reuse_sessions = $rabbitmq::ssl_reuse_sessions
$ssl_honor_cipher_order = $rabbitmq::ssl_honor_cipher_order
$ssl_dhfile = $rabbitmq::ssl_dhfile
$ssl_versions = $rabbitmq::ssl_versions
$ssl_ciphers = $rabbitmq::ssl_ciphers
$ssl_crl_check = $rabbitmq::ssl_crl_check
$ssl_crl_cache_hash_dir = $rabbitmq::ssl_crl_cache_hash_dir
$ssl_crl_cache_http_timeout = $rabbitmq::ssl_crl_cache_http_timeout
$stomp_port = $rabbitmq::stomp_port
$stomp_ssl_only = $rabbitmq::stomp_ssl_only
$ldap_auth = $rabbitmq::ldap_auth
$ldap_server = $rabbitmq::ldap_server
$ldap_user_dn_pattern = $rabbitmq::ldap_user_dn_pattern
$ldap_other_bind = $rabbitmq::ldap_other_bind
$ldap_use_ssl = $rabbitmq::ldap_use_ssl
$ldap_port = $rabbitmq::ldap_port
$ldap_log = $rabbitmq::ldap_log
$ldap_config_variables = $rabbitmq::ldap_config_variables
$wipe_db_on_cookie_change = $rabbitmq::wipe_db_on_cookie_change
$config_variables = $rabbitmq::config_variables
$config_kernel_variables = $rabbitmq::config_kernel_variables
$config_management_variables = $rabbitmq::config_management_variables
$config_additional_variables = $rabbitmq::config_additional_variables
$auth_backends = $rabbitmq::auth_backends
$cluster_partition_handling = $rabbitmq::cluster_partition_handling
$file_limit = $rabbitmq::file_limit
$oom_score_adj = $rabbitmq::oom_score_adj
$collect_statistics_interval = $rabbitmq::collect_statistics_interval
$ipv6 = $rabbitmq::ipv6
$inetrc_config = $rabbitmq::inetrc_config
$inetrc_config_path = $rabbitmq::inetrc_config_path
$ssl_erl_dist = $rabbitmq::ssl_erl_dist
$loopback_users = $rabbitmq::loopback_users

if $ssl_only {
$default_ssl_env_variables = {}
Expand Down
24 changes: 24 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,25 @@
# The RabbitMQ port.
# @param python_package
# Name of the package required by rabbitmqadmin.
# @param quorum_membership_reconciliation_enabled
# Enables or disables continuous membership reconciliation.
# This REQUIRES RabbitMQ 3.13 or higher to be set to true. More information on this configuration
# can be found here: https://www.rabbitmq.com/docs/quorum-queues
# @param quorum_membership_reconciliation_auto_remove
# Enables or disables automatic removal of member nodes that are no longer part of the cluster,
# but still a member of the quorum queue.
# Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.
# @param quorum_membership_reconciliation_interval
# The default evaluation interval in milliseconds.
# Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.
# @param quorum_membership_reconciliation_trigger_interval
# The reconciliation delay in milliseconds, used when a trigger event occurs,
# for example, a node is added or removed from the cluster or an applicable policy changes.
# This delay will be applied only once, then the regular interval will be used again.
# Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.
# @param quorum_membership_reconciliation_target_group_size
# Controls the target group size for a quorum queue
# Important Note: This only takes affect if quorum_membership_reconciliation_enabled is set to true.
# @param repos_ensure
# Ensure that a repo with the official (and newer) RabbitMQ package is configured, along with its signing key.
# Defaults to false (use system packages). This does not ensure that soft dependencies are present.
Expand Down Expand Up @@ -385,6 +404,11 @@
Optional[Variant[Numeric, String[1]]] $package_apt_pin = undef,
String $package_ensure = 'installed',
Optional[String] $package_gpg_key = undef,
Optional[Boolean] $quorum_membership_reconciliation_enabled = undef,
Optional[Boolean] $quorum_membership_reconciliation_auto_remove = undef,
Optional[Integer] $quorum_membership_reconciliation_interval = undef,
Optional[Integer] $quorum_membership_reconciliation_trigger_interval = undef,
Optional[Integer] $quorum_membership_reconciliation_target_group_size = undef,
Optional[String] $repo_gpg_key = undef,
Variant[String, Array] $package_name = 'rabbitmq',
Optional[String] $package_source = undef,
Expand Down
Loading

0 comments on commit c7e6206

Please sign in to comment.