autocluster => cluster_formation in Cuttlefish schema
This commit is contained in:
parent
20a58d5731
commit
b856258214
|
@ -775,28 +775,28 @@ end}.
|
||||||
{mapping, "mirroring_sync_batch_size", "rabbit.mirroring_sync_batch_size",
|
{mapping, "mirroring_sync_batch_size", "rabbit.mirroring_sync_batch_size",
|
||||||
[{datatype, bytesize}, {validators, ["size_less_than_2G"]}]}.
|
[{datatype, bytesize}, {validators, ["size_less_than_2G"]}]}.
|
||||||
|
|
||||||
%% Peer discovery backend used by autoclustering.
|
%% Peer discovery backend used by cluster formation.
|
||||||
%%
|
%%
|
||||||
|
|
||||||
{mapping, "autocluster.peer_discovery_backend", "rabbit.autocluster.peer_discovery_backend", [
|
{mapping, "cluster_formation.peer_discovery_backend", "rabbit.cluster_formation.peer_discovery_backend", [
|
||||||
{datatype, atom}
|
{datatype, atom}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
%% Own node type used by autoclustering.
|
%% Own node type, used by cluster formation.
|
||||||
%%
|
%%
|
||||||
|
|
||||||
{mapping, "autocluster.node_type", "rabbit.autocluster.node_type", [
|
{mapping, "cluster_formation.node_type", "rabbit.cluster_formation.node_type", [
|
||||||
{datatype, {enum, [disc, disk, ram]}}
|
{datatype, {enum, [disc, disk, ram]}}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
{translation, "rabbit.autocluster.node_type",
|
{translation, "rabbit.cluster_formation.node_type",
|
||||||
fun(Conf) ->
|
fun(Conf) ->
|
||||||
%% if peer discovery backend isn't configured, don't generate
|
%% if peer discovery backend isn't configured, don't generate
|
||||||
%% node type
|
%% node type
|
||||||
case cuttlefish:conf_get("autocluster.peer_discovery_backend", Conf, undefined) of
|
case cuttlefish:conf_get("cluster_formation.peer_discovery_backend", Conf, undefined) of
|
||||||
undefined -> cuttlefish:unset();
|
undefined -> cuttlefish:unset();
|
||||||
_Backend ->
|
_Backend ->
|
||||||
case cuttlefish:conf_get("autocluster.node_type", Conf) of
|
case cuttlefish:conf_get("cluster_formation.node_type", Conf) of
|
||||||
disc -> disc;
|
disc -> disc;
|
||||||
%% always cast to `disc`
|
%% always cast to `disc`
|
||||||
disk -> disc;
|
disk -> disc;
|
||||||
|
@ -806,7 +806,7 @@ fun(Conf) ->
|
||||||
end
|
end
|
||||||
end}.
|
end}.
|
||||||
|
|
||||||
%% Classic config-driven autocluster backend.
|
%% Classic config-driven peer discuvery backend.
|
||||||
%%
|
%%
|
||||||
%% Make clustering happen *automatically* at startup - only applied
|
%% Make clustering happen *automatically* at startup - only applied
|
||||||
%% to nodes that have just been reset or started for the first time.
|
%% to nodes that have just been reset or started for the first time.
|
||||||
|
@ -815,17 +815,17 @@ end}.
|
||||||
%%
|
%%
|
||||||
%% {cluster_nodes, {['rabbit@my.host.com'], disc}},
|
%% {cluster_nodes, {['rabbit@my.host.com'], disc}},
|
||||||
|
|
||||||
{mapping, "autocluster.classic_config.nodes.$node", "rabbit.cluster_nodes",
|
{mapping, "cluster_formation.classic_config.nodes.$node", "rabbit.cluster_nodes",
|
||||||
[{datatype, atom}]}.
|
[{datatype, atom}]}.
|
||||||
|
|
||||||
{translation, "rabbit.cluster_nodes",
|
{translation, "rabbit.cluster_nodes",
|
||||||
fun(Conf) ->
|
fun(Conf) ->
|
||||||
Nodes = [V || {_, V} <- cuttlefish_variable:filter_by_prefix("autocluster.classic_config.nodes", Conf)],
|
Nodes = [V || {_, V} <- cuttlefish_variable:filter_by_prefix("cluster_formation.classic_config.nodes", Conf)],
|
||||||
|
|
||||||
case Nodes of
|
case Nodes of
|
||||||
[] -> cuttlefish:unset();
|
[] -> cuttlefish:unset();
|
||||||
Other ->
|
Other ->
|
||||||
case cuttlefish:conf_get("autocluster.node_type", Conf, disc) of
|
case cuttlefish:conf_get("cluster_formation.node_type", Conf, disc) of
|
||||||
disc -> {Other, disc};
|
disc -> {Other, disc};
|
||||||
%% Always cast to `disc`
|
%% Always cast to `disc`
|
||||||
disk -> {Other, disc};
|
disk -> {Other, disc};
|
||||||
|
@ -837,12 +837,12 @@ end}.
|
||||||
%% DNS (A records and reverse lookups)-based peer discovery.
|
%% DNS (A records and reverse lookups)-based peer discovery.
|
||||||
%%
|
%%
|
||||||
|
|
||||||
{mapping, "autocluster.dns.hostname", "rabbit.autocluster.peer_discovery_dns.hostname",
|
{mapping, "cluster_formation.dns.hostname", "rabbit.cluster_formation.peer_discovery_dns.hostname",
|
||||||
[{datatype, string}]}.
|
[{datatype, string}]}.
|
||||||
|
|
||||||
{translation, "rabbit.autocluster.peer_discovery_dns.hostname",
|
{translation, "rabbit.cluster_formation.peer_discovery_dns.hostname",
|
||||||
fun(Conf) ->
|
fun(Conf) ->
|
||||||
case cuttlefish:conf_get("autocluster.dns.hostname", Conf, undefined) of
|
case cuttlefish:conf_get("cluster_formation.dns.hostname", Conf, undefined) of
|
||||||
undefined -> cuttlefish:unset();
|
undefined -> cuttlefish:unset();
|
||||||
Value -> list_to_binary(Value)
|
Value -> list_to_binary(Value)
|
||||||
end
|
end
|
||||||
|
|
|
@ -84,30 +84,30 @@ default_permissions.write = .*",
|
||||||
{default_user_tags,[administrator]},
|
{default_user_tags,[administrator]},
|
||||||
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]}]}],
|
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster,
|
{cluster_formation,
|
||||||
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
||||||
autocluster.classic_config.nodes.peer1 = rabbit@hostname1
|
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
|
||||||
autocluster.classic_config.nodes.peer2 = rabbit@hostname2
|
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
|
||||||
autocluster.node_type = disc",
|
cluster_formation.node_type = disc",
|
||||||
[{rabbit,
|
[{rabbit,
|
||||||
[{autocluster,
|
[{cluster_formation,
|
||||||
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
||||||
{node_type,disc}]},
|
{node_type,disc}]},
|
||||||
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
|
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster_disK,
|
{cluster_formation_disK,
|
||||||
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
||||||
autocluster.classic_config.nodes.peer1 = rabbit@hostname1
|
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
|
||||||
autocluster.classic_config.nodes.peer2 = rabbit@hostname2
|
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
|
||||||
autocluster.node_type = disk",
|
cluster_formation.node_type = disk",
|
||||||
[{rabbit,
|
[{rabbit,
|
||||||
[{autocluster,
|
[{cluster_formation,
|
||||||
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
||||||
{node_type,disc}]},
|
{node_type,disc}]},
|
||||||
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
|
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster_ram_ignored,
|
{cluster_formation_ram_ignored,
|
||||||
"autocluster.node_type = ram",[],[]},
|
"cluster_formation.node_type = ram",[],[]},
|
||||||
{tcp_listen_options,
|
{tcp_listen_options,
|
||||||
"tcp_listen_options.backlog = 128
|
"tcp_listen_options.backlog = 128
|
||||||
tcp_listen_options.nodelay = true
|
tcp_listen_options.nodelay = true
|
||||||
|
@ -320,29 +320,29 @@ tcp_listen_options.exit_on_close = false",
|
||||||
"tcp_listen_options.linger.timeout = 100",
|
"tcp_listen_options.linger.timeout = 100",
|
||||||
[{rabbit,[{tcp_listen_options,[{linger,{false,100}}]}]}],
|
[{rabbit,[{tcp_listen_options,[{linger,{false,100}}]}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster_dns,
|
{cluster_formation_dns,
|
||||||
"autocluster.peer_discovery_backend = rabbit_peer_discovery_dns
|
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns
|
||||||
autocluster.dns.hostname = 192.168.0.2.xip.io
|
cluster_formation.dns.hostname = 192.168.0.2.xip.io
|
||||||
autocluster.node_type = disc",
|
cluster_formation.node_type = disc",
|
||||||
[{rabbit,
|
[{rabbit,
|
||||||
[{autocluster,
|
[{cluster_formation,
|
||||||
[{peer_discovery_dns,[{hostname,<<"192.168.0.2.xip.io">>}]},
|
[{peer_discovery_dns,[{hostname,<<"192.168.0.2.xip.io">>}]},
|
||||||
{peer_discovery_backend,rabbit_peer_discovery_dns},
|
{peer_discovery_backend,rabbit_peer_discovery_dns},
|
||||||
{node_type,disc}]}]}],
|
{node_type,disc}]}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster_classic,
|
{cluster_formation_classic,
|
||||||
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
||||||
autocluster.node_type = disc",
|
cluster_formation.node_type = disc",
|
||||||
[{rabbit,
|
[{rabbit,
|
||||||
[{autocluster,
|
[{cluster_formation,
|
||||||
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
||||||
{node_type,disc}]}]}],
|
{node_type,disc}]}]}],
|
||||||
[]},
|
[]},
|
||||||
{autocluster_classic_ram,
|
{cluster_formation_classic_ram,
|
||||||
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
|
||||||
autocluster.node_type = ram",
|
cluster_formation.node_type = ram",
|
||||||
[{rabbit,
|
[{rabbit,
|
||||||
[{autocluster,
|
[{cluster_formation,
|
||||||
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
|
||||||
{node_type,ram}]}]}],
|
{node_type,ram}]}]}],
|
||||||
[]},
|
[]},
|
||||||
|
|
Loading…
Reference in New Issue