Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #16 from rabbitmq/cuttlefish-lock-timeout-alias
Browse files Browse the repository at this point in the history
Alias cluster_formation.etcd.lock_timeout to cluster_formation.etcd.lock_wait_time
  • Loading branch information
lukebakken committed Oct 9, 2018
2 parents f58f9ca + 07571d1 commit adfbdc4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
17 changes: 14 additions & 3 deletions priv/schema/rabbitmq_peer_discovery_etcd.schema
Expand Up @@ -91,10 +91,21 @@ end}.
{validators, ["non_negative_integer"]}
]}.

{mapping, "cluster_formation.etcd.lock_timeout", "rabbit.cluster_formation.peer_discovery_etcd.lock_wait_time", [
{datatype, integer},
{validators, ["non_negative_integer"]}
]}.

%% an alias for lock acquisition timeout to be consistent with the etcd backend

{translation, "rabbit.cluster_formation.peer_discovery_etcd.lock_wait_time",
fun(Conf) ->
case cuttlefish:conf_get("cluster_formation.etcd.lock_wait_time", Conf, undefined) of
undefined -> cuttlefish:unset();
Value -> Value
case cuttlefish:conf_get("cluster_formation.etcd.lock_timeout", Conf, undefined) of
undefined ->
case cuttlefish:conf_get("cluster_formation.etcd.lock_wait_time", Conf, undefined) of
undefined -> cuttlefish:unset();
Value -> Value
end;
Value -> Value
end
end}.
Expand Up @@ -66,6 +66,18 @@
], [rabbitmq_peer_discovery_etcd]
},
%% lock acquisition timeout
{etcd_lock_wait_time, "cluster_formation.etcd.lock_timeout = 400", [
{rabbit, [
{cluster_formation, [
{peer_discovery_etcd, [
{lock_wait_time, 400}
]}
]}
]}
], [rabbitmq_peer_discovery_etcd]
},

%% alias for consistency with etcd
{etcd_lock_wait_time, "cluster_formation.etcd.lock_wait_time = 400", [
{rabbit, [
{cluster_formation, [
Expand Down

0 comments on commit adfbdc4

Please sign in to comment.