rabbitmq-server/deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets

772 lines
28 KiB
Plaintext
Raw Normal View History

[{internal_auth_backend,
"auth_backends.1 = internal",
[{rabbit,[{auth_backends,[rabbit_auth_backend_internal]}]}],
[]},
{ldap_auth_backend,
"auth_backends.1 = ldap",
[{rabbit,[{auth_backends,[rabbit_auth_backend_ldap]}]}],
[]},
{multiple_auth_backends,
"auth_backends.1 = ldap
auth_backends.2 = internal",
[{rabbit,
[{auth_backends,
[rabbit_auth_backend_ldap,rabbit_auth_backend_internal]}]}],
[]},
{full_name_auth_backend,
"auth_backends.1 = ldap
# uses module name instead of a short alias, \"http\"
auth_backends.2 = rabbit_auth_backend_http",
[{rabbit,
[{auth_backends,[rabbit_auth_backend_ldap,rabbit_auth_backend_http]}]}],
[]},
{third_party_auth_backend,
"auth_backends.1.authn = internal
# uses module name because this backend is from a 3rd party
auth_backends.1.authz = rabbit_auth_backend_ip_range",
[{rabbit,
[{auth_backends,
[{rabbit_auth_backend_internal,rabbit_auth_backend_ip_range}]}]}],
[]},
{authn_authz_backend,
"auth_backends.1.authn = ldap
auth_backends.1.authz = internal",
[{rabbit,
[{auth_backends,
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal}]}]}],
[]},
{authn_authz_multiple_backends,
"auth_backends.1.authn = ldap
auth_backends.1.authz = internal
auth_backends.2 = internal",
[{rabbit,
[{auth_backends,
[{rabbit_auth_backend_ldap,rabbit_auth_backend_internal},
rabbit_auth_backend_internal]}]}],
[]},
{authn_backend_only,
"auth_backends.1.authn = ldap",
[{rabbit,
[{auth_backends,
[{rabbit_auth_backend_ldap,rabbit_auth_backend_ldap}]}]}],
[]},
{ssl_options,
"ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = true",
[{rabbit,
[{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{verify,verify_peer},
{fail_if_no_peer_cert,true}]}]}],
[]},
{tcp_listener,
"listeners.tcp.default = 5673",
[{rabbit,[{tcp_listeners,[5673]}]}],[]},
{ssl_listener,
"listeners.ssl = none",[{rabbit,[{ssl_listeners,[]}]}],[]},
{num_acceptors,
"num_acceptors.ssl = 1",[{rabbit,[{num_ssl_acceptors,1}]}],[]},
{socket_writer_gc_threshold,
"socket_writer.gc_threshold = 999666111", [{rabbit, [{writer_gc_threshold, 999666111}]}],[]},
{socket_writer_gc_threshold_off,
"socket_writer.gc_threshold = off", [{rabbit, [{writer_gc_threshold, undefined}]}],[]},
{default_user_settings,
"default_user = guest
default_pass = guest
default_user_tags.administrator = true
default_permissions.configure = .*
default_permissions.read = .*
default_permissions.write = .*",
[{rabbit,
[{default_user,<<"guest">>},
{default_pass,<<"guest">>},
{default_user_tags,[administrator]},
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]}]}],
[]},
{cluster_formation,
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
cluster_formation.node_type = disc",
[{rabbit,
[{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
{node_type,disc}]},
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
[]},
{cluster_formation_module_classic_confog_alias,
"cluster_formation.peer_discovery_backend = classic_config
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2",
[{rabbit,
[{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_classic_config}]},
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
[]},
{cluster_formation_module_dns_alias,
"cluster_formation.peer_discovery_backend = dns
cluster_formation.dns.hostname = discovery.eng.example.local",
[{rabbit,
[
{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_dns},
{peer_discovery_dns, [
{hostname, <<"discovery.eng.example.local">>}
]}]}
]}],
[]},
{cluster_formation_disk,
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
cluster_formation.node_type = disk",
[{rabbit,
[{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
{node_type,disc}]},
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
[]},
{cluster_formation_ram_ignored,
"cluster_formation.node_type = ram",[],[]},
{tcp_listen_options,
"tcp_listen_options.backlog = 128
tcp_listen_options.nodelay = true
tcp_listen_options.exit_on_close = false",
[{rabbit,
[{tcp_listen_options,
[{backlog,128},{nodelay,true},{exit_on_close,false}]}]}],
[]},
{vm_memory_watermark_absolute,
"vm_memory_high_watermark.absolute = 1073741824",
[{rabbit,[{vm_memory_high_watermark,{absolute,1073741824}}]}],
[]},
{vm_memory_watermark_absolute_units,
"vm_memory_high_watermark.absolute = 1024MB",
[{rabbit,[{vm_memory_high_watermark,{absolute,"1024MB"}}]}],
[]},
{vm_memory_watermark_paging_ratio,
"vm_memory_high_watermark_paging_ratio = 0.75
vm_memory_high_watermark.relative = 0.4",
[{rabbit,
[{vm_memory_high_watermark_paging_ratio,0.75},
{vm_memory_high_watermark,0.4}]}],
[]},
{memory_monitor_interval, "memory_monitor_interval = 5000",
[{rabbit,
[{memory_monitor_interval, 5000}]}],
[]},
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = rss",
[{rabbit,
[{vm_memory_calculation_strategy, rss}]}],
[]},
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = erlang",
[{rabbit,
[{vm_memory_calculation_strategy, erlang}]}],
[]},
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = allocated",
[{rabbit,
[{vm_memory_calculation_strategy, allocated}]}],
[]},
{vm_memory_calculation_strategy, "vm_memory_calculation_strategy = legacy",
[{rabbit,
[{vm_memory_calculation_strategy, legacy}]}],
[]},
{total_memory_available_override_value,
"total_memory_available_override_value = 1000000000",
[{rabbit,[{total_memory_available_override_value, 1000000000}]}],
[]},
{total_memory_available_override_value_units,
"total_memory_available_override_value = 1024MB",
[{rabbit,[{total_memory_available_override_value, "1024MB"}]}],
[]},
{connection_max,
"connection_max = 999",
[{rabbit,[{connection_max, 999}]}],
[]},
{connection_max,
"connection_max = infinity",
[{rabbit,[{connection_max, infinity}]}],
[]},
{channel_max,
"channel_max = 16",
[{rabbit,[{channel_max, 16}]}],
[]},
{max_message_size,
"max_message_size = 131072",
[{rabbit, [{max_message_size, 131072}]}],
[]},
{listeners_tcp_ip,
"listeners.tcp.1 = 192.168.1.99:5672",
[{rabbit,[{tcp_listeners,[{"192.168.1.99",5672}]}]}],
[]},
{listeners_tcp_ip_multiple,
"listeners.tcp.1 = 127.0.0.1:5672
listeners.tcp.2 = ::1:5672",
[{rabbit,[{tcp_listeners,[{"127.0.0.1",5672},{"::1",5672}]}]}],
[]},
{listeners_tcp_ip_all,"listeners.tcp.1 = :::5672",
[{rabbit,[{tcp_listeners,[{"::",5672}]}]}],
[]},
{listeners_tcp_ipv6,
"listeners.tcp.1 = fe80::2acf:e9ff:fe17:f97b:5672",
[{rabbit,[{tcp_listeners,[{"fe80::2acf:e9ff:fe17:f97b",5672}]}]}],
[]},
{tcp_options_sndbuf,
"tcp_listen_options.backlog = 128
tcp_listen_options.nodelay = true
tcp_listen_options.sndbuf = 196608
tcp_listen_options.recbuf = 196608",
[{rabbit,
[{tcp_listen_options,
[{backlog,128},{nodelay,true},{sndbuf,196608},{recbuf,196608}]}]}],
[]},
{tcp_listen_options_nodelay_with_kernel,
"tcp_listen_options.backlog = 4096
tcp_listen_options.nodelay = true",
[{kernel,
[{inet_default_connect_options,[{nodelay,true}]},
{inet_default_listen_options,[{nodelay,true}]}]}],
[{kernel,
[{inet_default_connect_options,[{nodelay,true}]},
{inet_default_listen_options,[{nodelay,true}]}]},
{rabbit,[{tcp_listen_options,[{backlog,4096},{nodelay,true}]}]}],
[]},
{tcp_listen_options_nodelay,
"tcp_listen_options.backlog = 4096
tcp_listen_options.nodelay = true",
[{rabbit,[{tcp_listen_options,[{backlog,4096},{nodelay,true}]}]}],
[]},
{ssl_handshake_timeout,
"ssl_handshake_timeout = 10000",
[{rabbit,[{ssl_handshake_timeout,10000}]}],
[]},
{cluster_partition_handling_pause_if_all_down,
"cluster_partition_handling = pause_if_all_down
## Recover strategy. Can be either 'autoheal' or 'ignore'
cluster_partition_handling.pause_if_all_down.recover = ignore
## Node names to check
cluster_partition_handling.pause_if_all_down.nodes.1 = rabbit@myhost1
cluster_partition_handling.pause_if_all_down.nodes.2 = rabbit@myhost2",
[{rabbit,
[{cluster_partition_handling,
{pause_if_all_down,[rabbit@myhost2,rabbit@myhost1],ignore}}]}],
[]},
{cluster_partition_handling_autoheal,
"cluster_partition_handling = autoheal",
[{rabbit,[{cluster_partition_handling,autoheal}]}],
[]},
{password_hashing,
"password_hashing_module = rabbit_password_hashing_sha512",
[{rabbit,[{password_hashing_module,rabbit_password_hashing_sha512}]}],
[]},
{ssl_options_verify_peer,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{verify,verify_peer},
{fail_if_no_peer_cert,false}]}]}],
[]},
{ssl_options_password,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.password = t0p$3kRe7",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{password,"t0p$3kRe7"}]}]}],
[]},
{ssl_options_tls_ver_old,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.versions.tls1_2 = tlsv1.2
ssl_options.versions.tls1_1 = tlsv1.1
ssl_options.versions.tls1 = tlsv1",
[{ssl,[{versions,['tlsv1.2','tlsv1.1',tlsv1]}]}],
[{ssl,[{versions,['tlsv1.2','tlsv1.1',tlsv1]}]},
{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{versions,['tlsv1.2','tlsv1.1',tlsv1]}]}]}],
[]},
{ssl_options_tls_ver_new,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.versions.tls1_2 = tlsv1.2
ssl_options.versions.tls1_1 = tlsv1.1",
[{ssl,[{versions,['tlsv1.2','tlsv1.1']}]}],
[{ssl,[{versions,['tlsv1.2','tlsv1.1']}]},
{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{versions,['tlsv1.2','tlsv1.1']}]}]}],
[]},
{ssl_options_ciphers,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.versions.1 = tlsv1.2
ssl_options.versions.2 = tlsv1.1
ssl_options.ciphers.1 = ECDHE-ECDSA-AES256-GCM-SHA384
ssl_options.ciphers.2 = ECDHE-RSA-AES256-GCM-SHA384
ssl_options.ciphers.3 = ECDHE-ECDSA-AES256-SHA384
ssl_options.ciphers.4 = ECDHE-RSA-AES256-SHA384
ssl_options.ciphers.5 = ECDH-ECDSA-AES256-GCM-SHA384
ssl_options.ciphers.6 = ECDH-RSA-AES256-GCM-SHA384
ssl_options.ciphers.7 = ECDH-ECDSA-AES256-SHA384
ssl_options.ciphers.8 = ECDH-RSA-AES256-SHA384
ssl_options.ciphers.9 = DHE-RSA-AES256-GCM-SHA384",
[{ssl,[{versions,['tlsv1.2','tlsv1.1']}]}],
[{ssl,[{versions,['tlsv1.2','tlsv1.1']}]},
{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{ciphers, [
"ECDHE-ECDSA-AES256-GCM-SHA384",
"ECDHE-RSA-AES256-GCM-SHA384",
"ECDHE-ECDSA-AES256-SHA384",
"ECDHE-RSA-AES256-SHA384",
"ECDH-ECDSA-AES256-GCM-SHA384",
"ECDH-RSA-AES256-GCM-SHA384",
"ECDH-ECDSA-AES256-SHA384",
"ECDH-RSA-AES256-SHA384",
"DHE-RSA-AES256-GCM-SHA384"
]},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{versions,['tlsv1.2','tlsv1.1']}]}]}],
[]},
{ssl_options_allow_poodle,
"listeners.ssl.1 = 5671
ssl_allow_poodle_attack = true
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_allow_poodle_attack,true},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{verify,verify_peer},
{fail_if_no_peer_cert,false}]}]}],
[]},
{ssl_options_depth,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.depth = 2
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{depth,2},
{verify,verify_peer},
{fail_if_no_peer_cert,false}]}]}],
[]},
{ssl_options_depth_0,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.depth = 0
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
2020-11-04 21:09:09 +08:00
{depth,0},
{verify,verify_peer},
{fail_if_no_peer_cert,false}]}]}],
[]},
2020-11-04 21:44:05 +08:00
{ssl_options_depth_255,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.depth = 255
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{depth,255},
{verify,verify_peer},
{fail_if_no_peer_cert,false}]}]}],
[]},
{ssl_options_honor_cipher_order,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.depth = 2
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.honor_cipher_order = true",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{depth,2},
{verify,verify_peer},
{fail_if_no_peer_cert, false},
{honor_cipher_order, true}]}]}],
[]},
{ssl_options_honor_ecc_order,
"listeners.ssl.1 = 5671
ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem
ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem
ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem
ssl_options.depth = 2
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
ssl_options.honor_ecc_order = true",
[{rabbit,
[{ssl_listeners,[5671]},
{ssl_options,
[{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"},
{certfile,"test/config_schema_SUITE_data/certs/cert.pem"},
{keyfile,"test/config_schema_SUITE_data/certs/key.pem"},
{depth,2},
{verify,verify_peer},
{fail_if_no_peer_cert, false},
{honor_ecc_order, true}]}]}],
[]},
{ssl_cert_login_from_cn,
"ssl_cert_login_from = common_name",
[{rabbit,[{ssl_cert_login_from, common_name}]}],
[]},
{ssl_cert_login_from_dn,
"ssl_cert_login_from = distinguished_name",
[{rabbit,[{ssl_cert_login_from, distinguished_name}]}],
[]},
{ssl_cert_login_from_san_dns,
"ssl_cert_login_from = subject_alternative_name
ssl_cert_login_san_type = dns
ssl_cert_login_san_index = 0",
[{rabbit,[
{ssl_cert_login_from, subject_alternative_name},
{ssl_cert_login_san_type, dns},
{ssl_cert_login_san_index, 0}
]}],
[]},
{ssl_options_bypass_pem_cache,
"ssl_options.bypass_pem_cache = true",
[{ssl, [
{bypass_pem_cache, true}
]}],
[]},
{tcp_listen_options_linger_on,
"tcp_listen_options.linger.on = true
tcp_listen_options.linger.timeout = 100",
[{rabbit,[{tcp_listen_options,[{linger,{true,100}}]}]}],
[]},
{tcp_listen_options_linger_off,
"tcp_listen_options.linger.on = false
tcp_listen_options.linger.timeout = 100",
[{rabbit,[{tcp_listen_options,[{linger,{false,100}}]}]}],
[]},
{tcp_listen_options_linger_on_notimeout,
"tcp_listen_options.linger.on = true",
[{rabbit,[{tcp_listen_options,[{linger,{true,0}}]}]}],
[]},
{tcp_listen_options_linger_timeout,
"tcp_listen_options.linger.timeout = 100",
[{rabbit,[{tcp_listen_options,[{linger,{false,100}}]}]}],
[]},
{cluster_formation_randomized_startup_delay_both_values,
"cluster_formation.randomized_startup_delay_range.min = 10
cluster_formation.randomized_startup_delay_range.max = 30",
Remove randomized startup delays On initial cluster formation, only one node in a multi node cluster should initialize the Mnesia database schema (i.e. form the cluster). To ensure that for nodes starting up in parallel, RabbitMQ peer discovery backends have used either locks or randomized startup delays. Locks work great: When a node holds the lock, it either starts a new blank node (if there is no other node in the cluster), or it joins an existing node. This makes it impossible to have two nodes forming the cluster at the same time. Consul and etcd peer discovery backends use locks. The lock is acquired in the consul and etcd infrastructure, respectively. For other peer discovery backends (classic, DNS, AWS), randomized startup delays were used. They work good enough in most cases. However, in https://github.com/rabbitmq/cluster-operator/issues/662 we observed that in 1% - 10% of the cases (the more nodes or the smaller the randomized startup delay range, the higher the chances), two nodes decide to form the cluster. That's bad since it will end up in a single Erlang cluster, but in two RabbitMQ clusters. Even worse, no obvious alert got triggered or error message logged. To solve this issue, one could increase the randomized startup delay range from e.g. 0m - 1m to 0m - 3m. However, this makes initial cluster formation very slow since it will take up to 3 minutes until every node is ready. In rare cases, we still end up with two nodes forming the cluster. Another way to solve the problem is to name a dedicated node to be the seed node (forming the cluster). This was explored in https://github.com/rabbitmq/cluster-operator/pull/689 and works well. Two minor downsides to this approach are: 1. If the seed node never becomes available, the whole cluster won't be formed (which is okay), and 2. it doesn't integrate with existing dynamic peer discovery backends (e.g. K8s, AWS) since nodes are not yet known at deploy time. In this commit, we take a better approach: We remove randomized startup delays altogether. We replace them with locks. However, instead of implementing our own lock implementation in an external system (e.g. in K8s), we re-use Erlang's locking mechanism global:set_lock/3. global:set_lock/3 has some convenient properties: 1. It accepts a list of nodes to set the lock on. 2. The nodes in that list connect to each other (i.e. create an Erlang cluster). 3. The method is synchronous with a timeout (number of retries). It blocks until the lock becomes available. 4. If a process that holds a lock dies, or the node goes down, the lock held by the process is deleted. The list of nodes passed to global:set_lock/3 corresponds to the nodes the peer discovery backend discovers (lists). Two special cases worth mentioning: 1. That list can be all desired nodes in the cluster (e.g. in classic peer discovery where nodes are known at deploy time) while only a subset of nodes is available. In that case, global:set_lock/3 still sets the lock not blocking until all nodes can be connected to. This is good since nodes might start sequentially (non-parallel). 2. In dynamic peer discovery backends (e.g. K8s, AWS), this list can be just a subset of desired nodes since nodes might not startup in parallel. That's also not a problem as long as the following requirement is met: "The peer disovery backend does not list two disjoint sets of nodes (on different nodes) at the same time." For example, in a 2-node cluster, the peer discovery backend must not list only node 1 on node 1 and only node 2 on node 2. Existing peer discovery backends fullfil that requirement because the resource the nodes are discovered from is global. For example, in K8s, once node 1 is part of the Endpoints object, it will be returned on both node 1 and node 2. Likewise, in AWS, once node 1 started, the described list of instances with a specific tag will include node 1 when the AWS peer discovery backend runs on node 1 or node 2. Removing randomized startup delays also makes cluster formation considerably faster (up to 1 minute faster if that was the upper bound in the range).
2021-05-18 07:01:08 +08:00
[],
[]},
{cluster_formation_randomized_startup_delay_min_only,
"cluster_formation.randomized_startup_delay_range.min = 10",
Remove randomized startup delays On initial cluster formation, only one node in a multi node cluster should initialize the Mnesia database schema (i.e. form the cluster). To ensure that for nodes starting up in parallel, RabbitMQ peer discovery backends have used either locks or randomized startup delays. Locks work great: When a node holds the lock, it either starts a new blank node (if there is no other node in the cluster), or it joins an existing node. This makes it impossible to have two nodes forming the cluster at the same time. Consul and etcd peer discovery backends use locks. The lock is acquired in the consul and etcd infrastructure, respectively. For other peer discovery backends (classic, DNS, AWS), randomized startup delays were used. They work good enough in most cases. However, in https://github.com/rabbitmq/cluster-operator/issues/662 we observed that in 1% - 10% of the cases (the more nodes or the smaller the randomized startup delay range, the higher the chances), two nodes decide to form the cluster. That's bad since it will end up in a single Erlang cluster, but in two RabbitMQ clusters. Even worse, no obvious alert got triggered or error message logged. To solve this issue, one could increase the randomized startup delay range from e.g. 0m - 1m to 0m - 3m. However, this makes initial cluster formation very slow since it will take up to 3 minutes until every node is ready. In rare cases, we still end up with two nodes forming the cluster. Another way to solve the problem is to name a dedicated node to be the seed node (forming the cluster). This was explored in https://github.com/rabbitmq/cluster-operator/pull/689 and works well. Two minor downsides to this approach are: 1. If the seed node never becomes available, the whole cluster won't be formed (which is okay), and 2. it doesn't integrate with existing dynamic peer discovery backends (e.g. K8s, AWS) since nodes are not yet known at deploy time. In this commit, we take a better approach: We remove randomized startup delays altogether. We replace them with locks. However, instead of implementing our own lock implementation in an external system (e.g. in K8s), we re-use Erlang's locking mechanism global:set_lock/3. global:set_lock/3 has some convenient properties: 1. It accepts a list of nodes to set the lock on. 2. The nodes in that list connect to each other (i.e. create an Erlang cluster). 3. The method is synchronous with a timeout (number of retries). It blocks until the lock becomes available. 4. If a process that holds a lock dies, or the node goes down, the lock held by the process is deleted. The list of nodes passed to global:set_lock/3 corresponds to the nodes the peer discovery backend discovers (lists). Two special cases worth mentioning: 1. That list can be all desired nodes in the cluster (e.g. in classic peer discovery where nodes are known at deploy time) while only a subset of nodes is available. In that case, global:set_lock/3 still sets the lock not blocking until all nodes can be connected to. This is good since nodes might start sequentially (non-parallel). 2. In dynamic peer discovery backends (e.g. K8s, AWS), this list can be just a subset of desired nodes since nodes might not startup in parallel. That's also not a problem as long as the following requirement is met: "The peer disovery backend does not list two disjoint sets of nodes (on different nodes) at the same time." For example, in a 2-node cluster, the peer discovery backend must not list only node 1 on node 1 and only node 2 on node 2. Existing peer discovery backends fullfil that requirement because the resource the nodes are discovered from is global. For example, in K8s, once node 1 is part of the Endpoints object, it will be returned on both node 1 and node 2. Likewise, in AWS, once node 1 started, the described list of instances with a specific tag will include node 1 when the AWS peer discovery backend runs on node 1 or node 2. Removing randomized startup delays also makes cluster formation considerably faster (up to 1 minute faster if that was the upper bound in the range).
2021-05-18 07:01:08 +08:00
[],
[]},
{cluster_formation_randomized_startup_delay_max_only,
"cluster_formation.randomized_startup_delay_range.max = 30",
Remove randomized startup delays On initial cluster formation, only one node in a multi node cluster should initialize the Mnesia database schema (i.e. form the cluster). To ensure that for nodes starting up in parallel, RabbitMQ peer discovery backends have used either locks or randomized startup delays. Locks work great: When a node holds the lock, it either starts a new blank node (if there is no other node in the cluster), or it joins an existing node. This makes it impossible to have two nodes forming the cluster at the same time. Consul and etcd peer discovery backends use locks. The lock is acquired in the consul and etcd infrastructure, respectively. For other peer discovery backends (classic, DNS, AWS), randomized startup delays were used. They work good enough in most cases. However, in https://github.com/rabbitmq/cluster-operator/issues/662 we observed that in 1% - 10% of the cases (the more nodes or the smaller the randomized startup delay range, the higher the chances), two nodes decide to form the cluster. That's bad since it will end up in a single Erlang cluster, but in two RabbitMQ clusters. Even worse, no obvious alert got triggered or error message logged. To solve this issue, one could increase the randomized startup delay range from e.g. 0m - 1m to 0m - 3m. However, this makes initial cluster formation very slow since it will take up to 3 minutes until every node is ready. In rare cases, we still end up with two nodes forming the cluster. Another way to solve the problem is to name a dedicated node to be the seed node (forming the cluster). This was explored in https://github.com/rabbitmq/cluster-operator/pull/689 and works well. Two minor downsides to this approach are: 1. If the seed node never becomes available, the whole cluster won't be formed (which is okay), and 2. it doesn't integrate with existing dynamic peer discovery backends (e.g. K8s, AWS) since nodes are not yet known at deploy time. In this commit, we take a better approach: We remove randomized startup delays altogether. We replace them with locks. However, instead of implementing our own lock implementation in an external system (e.g. in K8s), we re-use Erlang's locking mechanism global:set_lock/3. global:set_lock/3 has some convenient properties: 1. It accepts a list of nodes to set the lock on. 2. The nodes in that list connect to each other (i.e. create an Erlang cluster). 3. The method is synchronous with a timeout (number of retries). It blocks until the lock becomes available. 4. If a process that holds a lock dies, or the node goes down, the lock held by the process is deleted. The list of nodes passed to global:set_lock/3 corresponds to the nodes the peer discovery backend discovers (lists). Two special cases worth mentioning: 1. That list can be all desired nodes in the cluster (e.g. in classic peer discovery where nodes are known at deploy time) while only a subset of nodes is available. In that case, global:set_lock/3 still sets the lock not blocking until all nodes can be connected to. This is good since nodes might start sequentially (non-parallel). 2. In dynamic peer discovery backends (e.g. K8s, AWS), this list can be just a subset of desired nodes since nodes might not startup in parallel. That's also not a problem as long as the following requirement is met: "The peer disovery backend does not list two disjoint sets of nodes (on different nodes) at the same time." For example, in a 2-node cluster, the peer discovery backend must not list only node 1 on node 1 and only node 2 on node 2. Existing peer discovery backends fullfil that requirement because the resource the nodes are discovered from is global. For example, in K8s, once node 1 is part of the Endpoints object, it will be returned on both node 1 and node 2. Likewise, in AWS, once node 1 started, the described list of instances with a specific tag will include node 1 when the AWS peer discovery backend runs on node 1 or node 2. Removing randomized startup delays also makes cluster formation considerably faster (up to 1 minute faster if that was the upper bound in the range).
2021-05-18 07:01:08 +08:00
[],
[]},
{cluster_formation_internal_lock_retries,
"cluster_formation.internal_lock_retries = 10",
[{rabbit,[{cluster_formation,[{internal_lock_retries,10}]}]}],
[]},
{cluster_formation_dns,
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns
cluster_formation.dns.hostname = 192.168.0.2.xip.io
cluster_formation.node_type = disc",
[{rabbit,
[{cluster_formation,
[{peer_discovery_dns,[{hostname,<<"192.168.0.2.xip.io">>}]},
{peer_discovery_backend,rabbit_peer_discovery_dns},
{node_type,disc}]}]}],
[]},
{cluster_formation_classic,
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.node_type = disc",
[{rabbit,
[{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
{node_type,disc}]}]}],
[]},
{cluster_formation_classic_ram,
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
cluster_formation.node_type = ram",
[{rabbit,
[{cluster_formation,
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
{node_type,ram}]}]}],
[]},
{background_gc_enabled,
"background_gc_enabled = true
background_gc_target_interval = 30000",
[{rabbit,
[{background_gc_enabled,true},{background_gc_target_interval,30000}]}],
[]},
{background_gc_disabled,
"background_gc_enabled = false
background_gc_target_interval = 30000",
[{rabbit,
[{background_gc_enabled,false},{background_gc_target_interval,30000}]}],
[]},
{credential_validator_length,
"credential_validator.validation_backend = rabbit_credential_validator_min_password_length
credential_validator.min_length = 10",
[{rabbit,
[{credential_validator,
[{validation_backend,
rabbit_credential_validator_min_password_length},
{min_length,10}]}]}],
[]},
{credential_validator_regexp,
"credential_validator.validation_backend = rabbit_credential_validator_password_regexp
credential_validator.regexp = ^abc\\d+",
[{rabbit,
[{credential_validator,
[{validation_backend,rabbit_credential_validator_password_regexp},
{regexp,"^abc\\d+"}]}]}],
[]},
{proxy_protocol_on,
"proxy_protocol = true",
[{rabbit,[{proxy_protocol,true}]}],[]},
{proxy_protocol_off,
"proxy_protocol = false",
[{rabbit,[{proxy_protocol,false}]}],[]},
{default_worker_pool_size,
"default_worker_pool_size = 512",
[{rabbit, [
{default_worker_pool_size, 512}
]}],
[]},
{delegate_count,
"delegate_count = 64",
[{rabbit, [
{delegate_count, 64}
]}],
[]},
{kernel_net_ticktime,
"net_ticktime = 20",
[{kernel, [
{net_ticktime, 20}
]}],
[]},
2019-11-15 01:01:12 +08:00
{rabbit_consumer_timeout,
"consumer_timeout = 20000",
[{rabbit, [
{consumer_timeout, 20000}
]}],
[]},
{rabbit_msg_store_shutdown_timeout,
"message_store_shutdown_timeout = 600000",
[{rabbit, [
{msg_store_shutdown_timeout, 600000}
]}],
[]},
{rabbit_mnesia_table_loading_retry_timeout,
"mnesia_table_loading_retry_timeout = 45000",
[{rabbit, [
{mnesia_table_loading_retry_timeout, 45000}
]}],
[]},
%%
%% Definitions
%%
%% classic configuration key, implies a local filesystem path
{definition_files, "load_definitions = test/definition_import_SUITE_data/case1.json",
[{rabbit,
[{load_definitions, "test/definition_import_SUITE_data/case1.json"}]}],
[]},
%% modern configuration key, local filesystem source
{definition_files, "definitions.import_backend = local_filesystem
definitions.local.path = test/definition_import_SUITE_data/case1.json",
[{rabbit, [
{definitions, [
{import_backend, rabbit_definitions_import_local_filesystem},
{local_path, "test/definition_import_SUITE_data/case1.json"}
]}
]}],
[]},
%% modern configuration key, HTTPS source
{definition_files, "definitions.import_backend = https
definitions.https.url = https://rabbitmq.eng.megacorp.local/env-1/case1.json
definitions.tls.versions.1 = tlsv1.2
definitions.tls.log_level = error
definitions.tls.secure_renegotiate = true
definitions.tls.ciphers.1 = ECDHE-ECDSA-AES256-GCM-SHA384
definitions.tls.ciphers.2 = ECDHE-RSA-AES256-GCM-SHA384
definitions.tls.ciphers.3 = ECDH-ECDSA-AES256-GCM-SHA384
definitions.tls.ciphers.4 = ECDH-RSA-AES256-GCM-SHA384
definitions.tls.ciphers.5 = DHE-RSA-AES256-GCM-SHA384
definitions.tls.ciphers.6 = DHE-DSS-AES256-GCM-SHA384
definitions.tls.ciphers.7 = ECDHE-ECDSA-AES128-GCM-SHA256
definitions.tls.ciphers.8 = ECDHE-RSA-AES128-GCM-SHA256
definitions.tls.ciphers.9 = ECDH-ECDSA-AES128-GCM-SHA256
definitions.tls.ciphers.10 = ECDH-RSA-AES128-GCM-SHA256
definitions.tls.ciphers.11 = DHE-RSA-AES128-GCM-SHA256
definitions.tls.ciphers.12 = DHE-DSS-AES128-GCM-SHA256",
[{rabbit, [
{definitions, [
{import_backend, rabbit_definitions_import_https},
{url, "https://rabbitmq.eng.megacorp.local/env-1/case1.json"},
{ssl_options, [
{log_level, error},
{secure_renegotiate, true},
{versions, ['tlsv1.2']},
{ciphers, [
"ECDHE-ECDSA-AES256-GCM-SHA384",
"ECDHE-RSA-AES256-GCM-SHA384",
"ECDH-ECDSA-AES256-GCM-SHA384",
"ECDH-RSA-AES256-GCM-SHA384",
"DHE-RSA-AES256-GCM-SHA384",
"DHE-DSS-AES256-GCM-SHA384",
"ECDHE-ECDSA-AES128-GCM-SHA256",
"ECDHE-RSA-AES128-GCM-SHA256",
"ECDH-ECDSA-AES128-GCM-SHA256",
"ECDH-RSA-AES128-GCM-SHA256",
"DHE-RSA-AES128-GCM-SHA256",
"DHE-DSS-AES128-GCM-SHA256"
]}
]}
]}]}],
[]},
%%
%% Raft
%%
{raft_data_dir,
"raft.data_dir = /data/rabbitmq/raft/log",
[{ra, [
{data_dir, "/data/rabbitmq/raft/log"}
]}],
[]},
{raft_segment_max_entries,
"raft.segment_max_entries = 65536",
[{ra, [
{segment_max_entries, 65536}
]}],
[]},
{raft_wal_max_size_bytes,
"raft.wal_max_size_bytes = 1048576",
[{ra, [
{wal_max_size_bytes, 1048576}
]}],
[]},
{raft_wal_max_batch_size,
"raft.wal_max_batch_size = 4096",
[{ra, [
{wal_max_batch_size, 4096}
]}],
[]},
{raft_snapshot_chunk_size,
"raft.snapshot_chunk_size = 1000000",
[{ra, [
{snapshot_chunk_size, 1000000}
]}],
[]}
2017-08-30 22:08:05 +08:00
].