Skip to content

Commit b856258

Browse files
autocluster => cluster_formation in Cuttlefish schema
1 parent 20a58d5 commit b856258

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

priv/schema/rabbitmq.schema

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -775,28 +775,28 @@ end}.
775775
{mapping, "mirroring_sync_batch_size", "rabbit.mirroring_sync_batch_size",
776776
[{datatype, bytesize}, {validators, ["size_less_than_2G"]}]}.
777777

778-
%% Peer discovery backend used by autoclustering.
778+
%% Peer discovery backend used by cluster formation.
779779
%%
780780

781-
{mapping, "autocluster.peer_discovery_backend", "rabbit.autocluster.peer_discovery_backend", [
781+
{mapping, "cluster_formation.peer_discovery_backend", "rabbit.cluster_formation.peer_discovery_backend", [
782782
{datatype, atom}
783783
]}.
784784

785-
%% Own node type used by autoclustering.
785+
%% Own node type, used by cluster formation.
786786
%%
787787

788-
{mapping, "autocluster.node_type", "rabbit.autocluster.node_type", [
788+
{mapping, "cluster_formation.node_type", "rabbit.cluster_formation.node_type", [
789789
{datatype, {enum, [disc, disk, ram]}}
790790
]}.
791791

792-
{translation, "rabbit.autocluster.node_type",
792+
{translation, "rabbit.cluster_formation.node_type",
793793
fun(Conf) ->
794794
%% if peer discovery backend isn't configured, don't generate
795795
%% node type
796-
case cuttlefish:conf_get("autocluster.peer_discovery_backend", Conf, undefined) of
796+
case cuttlefish:conf_get("cluster_formation.peer_discovery_backend", Conf, undefined) of
797797
undefined -> cuttlefish:unset();
798798
_Backend ->
799-
case cuttlefish:conf_get("autocluster.node_type", Conf) of
799+
case cuttlefish:conf_get("cluster_formation.node_type", Conf) of
800800
disc -> disc;
801801
%% always cast to `disc`
802802
disk -> disc;
@@ -806,7 +806,7 @@ fun(Conf) ->
806806
end
807807
end}.
808808

809-
%% Classic config-driven autocluster backend.
809+
%% Classic config-driven peer discuvery backend.
810810
%%
811811
%% Make clustering happen *automatically* at startup - only applied
812812
%% to nodes that have just been reset or started for the first time.
@@ -815,17 +815,17 @@ end}.
815815
%%
816816
%% {cluster_nodes, {['[email protected]'], disc}},
817817

818-
{mapping, "autocluster.classic_config.nodes.$node", "rabbit.cluster_nodes",
818+
{mapping, "cluster_formation.classic_config.nodes.$node", "rabbit.cluster_nodes",
819819
[{datatype, atom}]}.
820820

821821
{translation, "rabbit.cluster_nodes",
822822
fun(Conf) ->
823-
Nodes = [V || {_, V} <- cuttlefish_variable:filter_by_prefix("autocluster.classic_config.nodes", Conf)],
823+
Nodes = [V || {_, V} <- cuttlefish_variable:filter_by_prefix("cluster_formation.classic_config.nodes", Conf)],
824824

825825
case Nodes of
826826
[] -> cuttlefish:unset();
827827
Other ->
828-
case cuttlefish:conf_get("autocluster.node_type", Conf, disc) of
828+
case cuttlefish:conf_get("cluster_formation.node_type", Conf, disc) of
829829
disc -> {Other, disc};
830830
%% Always cast to `disc`
831831
disk -> {Other, disc};
@@ -837,12 +837,12 @@ end}.
837837
%% DNS (A records and reverse lookups)-based peer discovery.
838838
%%
839839

840-
{mapping, "autocluster.dns.hostname", "rabbit.autocluster.peer_discovery_dns.hostname",
840+
{mapping, "cluster_formation.dns.hostname", "rabbit.cluster_formation.peer_discovery_dns.hostname",
841841
[{datatype, string}]}.
842842

843-
{translation, "rabbit.autocluster.peer_discovery_dns.hostname",
843+
{translation, "rabbit.cluster_formation.peer_discovery_dns.hostname",
844844
fun(Conf) ->
845-
case cuttlefish:conf_get("autocluster.dns.hostname", Conf, undefined) of
845+
case cuttlefish:conf_get("cluster_formation.dns.hostname", Conf, undefined) of
846846
undefined -> cuttlefish:unset();
847847
Value -> list_to_binary(Value)
848848
end

test/config_schema_SUITE_data/rabbit.snippets

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,30 +84,30 @@ default_permissions.write = .*",
8484
{default_user_tags,[administrator]},
8585
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]}]}],
8686
[]},
87-
{autocluster,
88-
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
89-
autocluster.classic_config.nodes.peer1 = rabbit@hostname1
90-
autocluster.classic_config.nodes.peer2 = rabbit@hostname2
91-
autocluster.node_type = disc",
87+
{cluster_formation,
88+
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
89+
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
90+
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
91+
cluster_formation.node_type = disc",
9292
[{rabbit,
93-
[{autocluster,
93+
[{cluster_formation,
9494
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
9595
{node_type,disc}]},
9696
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
9797
[]},
98-
{autocluster_disK,
99-
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
100-
autocluster.classic_config.nodes.peer1 = rabbit@hostname1
101-
autocluster.classic_config.nodes.peer2 = rabbit@hostname2
102-
autocluster.node_type = disk",
98+
{cluster_formation_disK,
99+
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
100+
cluster_formation.classic_config.nodes.peer1 = rabbit@hostname1
101+
cluster_formation.classic_config.nodes.peer2 = rabbit@hostname2
102+
cluster_formation.node_type = disk",
103103
[{rabbit,
104-
[{autocluster,
104+
[{cluster_formation,
105105
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
106106
{node_type,disc}]},
107107
{cluster_nodes,{[rabbit@hostname2,rabbit@hostname1],disc}}]}],
108108
[]},
109-
{autocluster_ram_ignored,
110-
"autocluster.node_type = ram",[],[]},
109+
{cluster_formation_ram_ignored,
110+
"cluster_formation.node_type = ram",[],[]},
111111
{tcp_listen_options,
112112
"tcp_listen_options.backlog = 128
113113
tcp_listen_options.nodelay = true
@@ -320,29 +320,29 @@ tcp_listen_options.exit_on_close = false",
320320
"tcp_listen_options.linger.timeout = 100",
321321
[{rabbit,[{tcp_listen_options,[{linger,{false,100}}]}]}],
322322
[]},
323-
{autocluster_dns,
324-
"autocluster.peer_discovery_backend = rabbit_peer_discovery_dns
325-
autocluster.dns.hostname = 192.168.0.2.xip.io
326-
autocluster.node_type = disc",
323+
{cluster_formation_dns,
324+
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_dns
325+
cluster_formation.dns.hostname = 192.168.0.2.xip.io
326+
cluster_formation.node_type = disc",
327327
[{rabbit,
328-
[{autocluster,
328+
[{cluster_formation,
329329
[{peer_discovery_dns,[{hostname,<<"192.168.0.2.xip.io">>}]},
330330
{peer_discovery_backend,rabbit_peer_discovery_dns},
331331
{node_type,disc}]}]}],
332332
[]},
333-
{autocluster_classic,
334-
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
335-
autocluster.node_type = disc",
333+
{cluster_formation_classic,
334+
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
335+
cluster_formation.node_type = disc",
336336
[{rabbit,
337-
[{autocluster,
337+
[{cluster_formation,
338338
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
339339
{node_type,disc}]}]}],
340340
[]},
341-
{autocluster_classic_ram,
342-
"autocluster.peer_discovery_backend = rabbit_peer_discovery_classic_config
343-
autocluster.node_type = ram",
341+
{cluster_formation_classic_ram,
342+
"cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config
343+
cluster_formation.node_type = ram",
344344
[{rabbit,
345-
[{autocluster,
345+
[{cluster_formation,
346346
[{peer_discovery_backend,rabbit_peer_discovery_classic_config},
347347
{node_type,ram}]}]}],
348348
[]},

0 commit comments

Comments
 (0)