fix: reset config not work in cluster

This commit is contained in:
Zhongwen Deng 2022-04-29 09:53:46 +08:00
parent e91d6f9806
commit bfdd86b3fd
2 changed files with 1 additions and 3 deletions

View File

@ -94,8 +94,6 @@ post_config_update(_, _Req, NewConf, OldConf, _AppEnvs) ->
{StopHttps, StartHttps} = diff_listeners(https, OldHttps, NewHttps), {StopHttps, StartHttps} = diff_listeners(https, OldHttps, NewHttps),
Stop = maps:merge(StopHttp, StopHttps), Stop = maps:merge(StopHttp, StopHttps),
Start = maps:merge(StartHttp, StartHttps), Start = maps:merge(StartHttp, StartHttps),
?SLOG(error, Stop#{action => stop}),
?SLOG(error, Start#{acton => start}),
_ = erlang:send_after(500, ?MODULE, {update_listeners, Stop, Start}), _ = erlang:send_after(500, ?MODULE, {update_listeners, Stop, Start}),
ok. ok.

View File

@ -250,7 +250,7 @@ global_zone_configs(put, #{body := Body}, _Req) ->
config_reset(post, _Params, Req) -> config_reset(post, _Params, Req) ->
%% reset the config specified by the query string param 'conf_path' %% reset the config specified by the query string param 'conf_path'
Path = conf_path_reset(Req) ++ conf_path_from_querystr(Req), Path = conf_path_reset(Req) ++ conf_path_from_querystr(Req),
case emqx:reset_config(Path, #{}) of case emqx_conf:reset(Path, ?OPTS) of
{ok, _} -> {ok, _} ->
{200}; {200};
{error, no_default_value} -> {error, no_default_value} ->