Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Unable to restart VM after applying CETS preset" #4143

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rel/files/mongooseim.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
{{{mod_last}}}
{{/mod_last}}
[modules.mod_stream_management]
{{#stream_management_backend}}
backend = "{{{stream_management_backend}}}"
{{/stream_management_backend}}

{{#mod_offline}}
[modules.mod_offline]
Expand Down
4 changes: 3 additions & 1 deletion src/auth/ejabberd_auth_anonymous.erl
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@
-spec start(mongooseim:host_type()) -> ok.
start(HostType) ->
%% TODO: Check cluster mode
mongoose_mnesia:create_table(anonymous,
%% TODO: Add CETS backend, use mongoose_mnesia
mnesia:create_table(anonymous,
[{ram_copies, [node()]}, {type, bag},
{attributes, record_info(fields, anonymous)}]),
mnesia:add_table_copy(anonymous, node(), ram_copies),
%% The hooks are needed to add / remove users from the anonymous tables
gen_hook:add_handlers(hooks(HostType)),
ok.
Expand Down
4 changes: 3 additions & 1 deletion src/mod_register.erl
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@
start(HostType, #{iqdisc := IQDisc}) ->
[gen_iq_handler:add_iq_handler_for_domain(HostType, ?NS_REGISTER, Component, Fn, #{}, IQDisc) ||
{Component, Fn} <- iq_handlers()],
mongoose_mnesia:create_table(mod_register_ip,
%% TODO Add CETS backend, use mongoose_mnesia
mnesia:create_table(mod_register_ip,
[{ram_copies, [node()]},
{local_content, true},
{attributes, [key, value]}]),
mnesia:add_table_copy(mod_register_ip, node(), ram_copies),
ok.

-spec stop(mongooseim:host_type()) -> ok.
Expand Down