Fix so that default policy ha-mode and ha-sync-mode are are converted to binary

This commit is contained in:
Simon Unge 2023-05-01 14:40:30 -07:00
parent 08c49edbd4
commit d0fadf9e08
2 changed files with 10 additions and 3 deletions

View File

@ -785,7 +785,14 @@ end}.
Conf,
["default_policies", "operator"],
fun({["default_policies","operator",ID,"classic_queues"|T], V}) ->
{["default_policies","operator",ID|T],V};
NewV = case T of
["ha_sync_mode"] ->
list_to_binary(V);
["ha_mode"] ->
list_to_binary(V);
_ -> V
end,
{["default_policies","operator",ID|T], NewV};
(E) -> E
end),
case Props of

View File

@ -147,9 +147,9 @@ ssl_options.fail_if_no_peer_cert = true",
",
[{rabbit, [{default_policies, [{operator, [
{<<"a">>, [{<<"expires">>, 3600000},
{<<"ha_mode">>, "exactly"},
{<<"ha_mode">>, <<"exactly">>},
{<<"ha_params">>, 2},
{<<"ha_sync_mode">>, "automatic"},
{<<"ha_sync_mode">>, <<"automatic">>},
{<<"queue_pattern">>, "apple"},
{<<"vhost_pattern">>, "banana"}]}]}]}]}],
[]},