Added 'unlimited' config setting for peer_discovery_retry_limit

This commit is contained in:
Simon Unge 2025-04-02 18:34:32 +00:00
parent 5a9482dfef
commit b7c4f66a69
2 changed files with 31 additions and 10 deletions

View File

@ -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},

View File

@ -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",