Skip to content

Added 'unlimited' config setting for peer_discovery_retry_limit (backport #13673) (backport #13675) #13676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions deps/rabbit/priv/schema/rabbit.schema
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,19 @@ end}.
]}.

{mapping, "cluster_formation.discovery_retry_limit", "rabbit.cluster_formation.discovery_retry_limit",
[
{datatype, integer},
{validators, ["non_zero_positive_integer"]}
]}.
[{datatype, [{atom, unlimited}, integer]}]}.

{translation, "rabbit.cluster_formation.discovery_retry_limit",
fun(Conf) ->
case cuttlefish:conf_get("cluster_formation.discovery_retry_limit", Conf, undefined) of
undefined -> cuttlefish:unset();
unlimited -> unlimited;
Val when is_integer(Val) andalso Val > 0 -> Val;
_ -> cuttlefish:invalid("should be positive integer or 'unlimited'")
end
end
}.

{mapping, "cluster_formation.discovery_retry_interval", "rabbit.cluster_formation.discovery_retry_interval",
[
{datatype, integer},
Expand Down
24 changes: 18 additions & 6 deletions deps/rabbit/test/config_schema_SUITE_data/rabbit.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2",
[{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",
Expand All @@ -287,7 +287,7 @@ cluster_formation.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
Expand Down Expand Up @@ -758,17 +758,17 @@ tcp_listen_options.exit_on_close = false",
{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
Expand All @@ -779,7 +779,7 @@ tcp_listen_options.exit_on_close = false",
{ssl_cert_login_san_index, 0}
]}],
[]},


{ssl_options_bypass_pem_cache,
"ssl_options.bypass_pem_cache = true",
Expand Down Expand Up @@ -838,6 +838,18 @@ tcp_listen_options.exit_on_close = false",
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
{node_type,ram}]}]}],
[]},
{cluster_formation_retry_limit_integer,
"cluster_formation.discovery_retry_limit = 500",
[{rabbit,
[{cluster_formation,
[{discovery_retry_limit, 500}]}]}],
[]},
{cluster_formation_retry_limit_infinity,
"cluster_formation.discovery_retry_limit = unlimited",
[{rabbit,
[{cluster_formation,
[{discovery_retry_limit, unlimited}]}]}],
[]},
{background_gc_enabled,
"background_gc_enabled = true
background_gc_target_interval = 30000",
Expand Down
Loading