File tree Expand file tree Collapse file tree 7 files changed +48
-0
lines changed Expand file tree Collapse file tree 7 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ The following parameters are available in the `rabbitmq` class:
277
277
* [ ` package_name ` ] ( #-rabbitmq--package_name )
278
278
* [ ` port ` ] ( #-rabbitmq--port )
279
279
* [ ` python_package ` ] ( #-rabbitmq--python_package )
280
+ * [ ` quorum_cluster_size ` ] ( #-rabbitmq--quorum_cluster_size )
280
281
* [ ` quorum_membership_reconciliation_enabled ` ] ( #-rabbitmq--quorum_membership_reconciliation_enabled )
281
282
* [ ` quorum_membership_reconciliation_auto_remove ` ] ( #-rabbitmq--quorum_membership_reconciliation_auto_remove )
282
283
* [ ` quorum_membership_reconciliation_interval ` ] ( #-rabbitmq--quorum_membership_reconciliation_interval )
@@ -845,6 +846,15 @@ Name of the package required by rabbitmqadmin.
845
846
846
847
Default value: ` 'python' `
847
848
849
+ ##### <a name =" -rabbitmq--quorum_cluster_size " ></a >` quorum_cluster_size `
850
+
851
+ Data type: ` Optional[Integer] `
852
+
853
+ Sets the default quorum queue cluster size.
854
+ More info can be found here: https://www.rabbitmq.com/docs/quorum-queues
855
+
856
+ Default value: ` undef `
857
+
848
858
##### <a name =" -rabbitmq--quorum_membership_reconciliation_enabled " ></a >` quorum_membership_reconciliation_enabled `
849
859
850
860
Data type: ` Optional[Boolean] `
Original file line number Diff line number Diff line change 13
13
message-ttl
14
14
queue-version
15
15
shards-per-node
16
+ target-group-size
16
17
] . freeze
17
18
18
19
Puppet ::Type . newtype ( :rabbitmq_policy ) do
Original file line number Diff line number Diff line change 28
28
$management_ssl = $rabbitmq::management_ssl
29
29
$management_hostname = $rabbitmq::management_hostname
30
30
$node_ip_address = $rabbitmq::node_ip_address
31
+ $quorum_cluster_size = $rabbitmq::quorum_cluster_size
31
32
$quorum_membership_reconciliation_enabled = $rabbitmq::quorum_membership_reconciliation_enabled
32
33
$quorum_membership_reconciliation_auto_remove = $rabbitmq::quorum_membership_reconciliation_auto_remove
33
34
$quorum_membership_reconciliation_interval = $rabbitmq::quorum_membership_reconciliation_interval
Original file line number Diff line number Diff line change 260
260
# The RabbitMQ port.
261
261
# @param python_package
262
262
# Name of the package required by rabbitmqadmin.
263
+ # @param quorum_cluster_size
264
+ # Sets the default quorum queue cluster size.
265
+ # More info can be found here: https://www.rabbitmq.com/docs/quorum-queues
263
266
# @param quorum_membership_reconciliation_enabled
264
267
# Enables or disables continuous membership reconciliation.
265
268
# This REQUIRES RabbitMQ 3.13 or higher to be set to true. More information on this configuration
421
424
Optional[Variant[Numeric, String[1]]] $package_apt_pin = undef ,
422
425
String $package_ensure = ' installed' ,
423
426
Optional[String] $package_gpg_key = undef ,
427
+ Optional[Integer] $quorum_cluster_size = undef ,
424
428
Optional[Boolean] $quorum_membership_reconciliation_enabled = undef ,
425
429
Optional[Boolean] $quorum_membership_reconciliation_auto_remove = undef ,
426
430
Optional[Integer] $quorum_membership_reconciliation_interval = undef ,
Original file line number Diff line number Diff line change 1817
1817
end
1818
1818
end
1819
1819
1820
+ describe 'quorum_cluster_size with default value' do
1821
+ it 'does not set quorum_cluster_size' do
1822
+ is_expected . to contain_file ( 'rabbitmq.config' ) . \
1823
+ without_content ( %r{quorum_cluster_size, } )
1824
+ end
1825
+ end
1826
+
1827
+ describe 'quorum_cluster_size with non-default value' do
1828
+ let ( :params ) { { quorum_cluster_size : 7 } }
1829
+
1830
+ it 'does set quorum_cluster_size to 7' do
1831
+ is_expected . to contain_file ( 'rabbitmq.config' ) . \
1832
+ with_content ( %r{quorum_cluster_size, 7} )
1833
+ end
1834
+ end
1835
+
1820
1836
# Ensure that whenever Param quorum_membership_reconciliation_enabled is unset - none of the
1821
1837
# other quorum_membership_reconciliation paramaters are set at all
1822
1838
# This ensures full backward compatibility with PRE RabbitMQ 3.13
Original file line number Diff line number Diff line change 234
234
end . to raise_error ( Puppet ::Error , %r{Invalid queue-version value.*oogabooga} )
235
235
end
236
236
237
+ it 'accepts and converts the target-group-size value' do
238
+ definition = { 'target-group-size' => '7' }
239
+ policy [ :definition ] = definition
240
+ expect ( policy [ :definition ] [ 'target-group-size' ] ) . to eq ( 7 )
241
+ end
242
+
243
+ it 'does not accept non-numeric target-group-size value' do
244
+ definition = { 'target-group-size' => 'notreal' }
245
+ expect do
246
+ policy [ :definition ] = definition
247
+ end . to raise_error ( Puppet ::Error , %r{Invalid target-group-size value.*notreal} )
248
+ end
249
+
237
250
context 'accepts list value in ha-params when ha-mode = nodes' do
238
251
before do
239
252
policy [ :definition ] = definition
Original file line number Diff line number Diff line change 26
26
<%- } -%>
27
27
{cluster_partition_handling, <%= $rabbitmq::config::cluster_partition_handling %>},
28
28
<% } -%>
29
+ <% if $rabbitmq::config::quorum_cluster_size {-%>
30
+ {quorum_cluster_size, <%= $rabbitmq::config::quorum_cluster_size %>},
31
+ <%- } -%>
29
32
<% if $rabbitmq::config::quorum_membership_reconciliation_enabled {-%>
30
33
{quorum_membership_reconciliation_enabled, <%= $rabbitmq::config::quorum_membership_reconciliation_enabled %>},
31
34
<%- unless $rabbitmq::config::quorum_membership_reconciliation_auto_remove =~ Undef {-%>
You can’t perform that action at this time.
0 commit comments