Merge pull request #8778 from emqx/merge-506-to-master
Merge v5.0.6 and v5.0.5 to master
This commit is contained in:
commit
13b08e08b4
|
@ -1,4 +1,4 @@
|
||||||
# 5.0.6
|
# 5.0.7
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
|
@ -6,6 +6,13 @@
|
||||||
* Fix `$queue` topic name error in management API return. [#8728](https://github.com/emqx/emqx/pull/8728)
|
* Fix `$queue` topic name error in management API return. [#8728](https://github.com/emqx/emqx/pull/8728)
|
||||||
* Fix sometimes `client.connected` and `client.disconnected` could be in wrong order. [#8625](https://github.com/emqx/emqx/pull/8625)
|
* Fix sometimes `client.connected` and `client.disconnected` could be in wrong order. [#8625](https://github.com/emqx/emqx/pull/8625)
|
||||||
|
|
||||||
|
|
||||||
|
# 5.0.6
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
|
||||||
|
* Upgrade Dashboard version to fix an issue where the node status was not displayed correctly. [#8771](https://github.com/emqx/emqx/pull/8771)
|
||||||
|
|
||||||
## Enhancements
|
## Enhancements
|
||||||
|
|
||||||
* Do not auto-populate default SSL cipher suites, so that the configs are less bloated. [#8769](https://github.com/emqx/emqx/pull/8769)
|
* Do not auto-populate default SSL cipher suites, so that the configs are less bloated. [#8769](https://github.com/emqx/emqx/pull/8769)
|
||||||
|
@ -25,6 +32,7 @@
|
||||||
* Updated `/nodes` API node_status from `Running/Stopped` to `running/stopped`. [#8642](https://github.com/emqx/emqx/pull/8642)
|
* Updated `/nodes` API node_status from `Running/Stopped` to `running/stopped`. [#8642](https://github.com/emqx/emqx/pull/8642)
|
||||||
* Improve handling of placeholder interpolation errors [#8635](https://github.com/emqx/emqx/pull/8635)
|
* Improve handling of placeholder interpolation errors [#8635](https://github.com/emqx/emqx/pull/8635)
|
||||||
* Better logging on unknown object IDs. [#8670](https://github.com/emqx/emqx/pull/8670)
|
* Better logging on unknown object IDs. [#8670](https://github.com/emqx/emqx/pull/8670)
|
||||||
|
* The bind option support `:1883` style. [#8758](https://github.com/emqx/emqx/pull/8758)
|
||||||
|
|
||||||
# 5.0.4
|
# 5.0.4
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-d
|
||||||
export EMQX_DEFAULT_RUNNER = debian:11-slim
|
export EMQX_DEFAULT_RUNNER = debian:11-slim
|
||||||
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
|
export OTP_VSN ?= $(shell $(CURDIR)/scripts/get-otp-vsn.sh)
|
||||||
export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh)
|
export ELIXIR_VSN ?= $(shell $(CURDIR)/scripts/get-elixir-vsn.sh)
|
||||||
export EMQX_DASHBOARD_VERSION ?= v1.0.6
|
export EMQX_DASHBOARD_VERSION ?= v1.0.7
|
||||||
export EMQX_EE_DASHBOARD_VERSION ?= e1.0.0
|
export EMQX_EE_DASHBOARD_VERSION ?= e1.0.0
|
||||||
export EMQX_REL_FORM ?= tgz
|
export EMQX_REL_FORM ?= tgz
|
||||||
export QUICER_DOWNLOAD_FROM_RELEASE = 1
|
export QUICER_DOWNLOAD_FROM_RELEASE = 1
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
%% `apps/emqx/src/bpapi/README.md'
|
%% `apps/emqx/src/bpapi/README.md'
|
||||||
|
|
||||||
%% Community edition
|
%% Community edition
|
||||||
-define(EMQX_RELEASE_CE, "5.0.5-beta.1").
|
-define(EMQX_RELEASE_CE, "5.0.6").
|
||||||
|
|
||||||
%% Enterprise edition
|
%% Enterprise edition
|
||||||
-define(EMQX_RELEASE_EE, "5.0.0-alpha.1").
|
-define(EMQX_RELEASE_EE, "5.0.0-alpha.1").
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{id, "emqx"},
|
{id, "emqx"},
|
||||||
{description, "EMQX Core"},
|
{description, "EMQX Core"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.5"},
|
{vsn, "5.0.6"},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [
|
{applications, [
|
||||||
|
|
|
@ -2164,8 +2164,12 @@ to_bar_separated_list(Str) ->
|
||||||
%% - 127.0.0.1:1883
|
%% - 127.0.0.1:1883
|
||||||
%% - ::1:1883
|
%% - ::1:1883
|
||||||
%% - [::1]:1883
|
%% - [::1]:1883
|
||||||
|
%% - :1883
|
||||||
|
%% - :::1883
|
||||||
to_ip_port(Str) ->
|
to_ip_port(Str) ->
|
||||||
case split_ip_port(Str) of
|
case split_ip_port(Str) of
|
||||||
|
{"", Port} ->
|
||||||
|
{ok, {{0, 0, 0, 0}, list_to_integer(Port)}};
|
||||||
{Ip, Port} ->
|
{Ip, Port} ->
|
||||||
PortVal = list_to_integer(Port),
|
PortVal = list_to_integer(Port),
|
||||||
case inet:parse_address(Ip) of
|
case inet:parse_address(Ip) of
|
||||||
|
|
|
@ -197,7 +197,7 @@ its own from which a browser should permit loading resources."""
|
||||||
zh: "多语言支持"
|
zh: "多语言支持"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bootstrap_user {
|
bootstrap_users_file {
|
||||||
desc {
|
desc {
|
||||||
en: "Initialize users file."
|
en: "Initialize users file."
|
||||||
zh: "初始化用户文件"
|
zh: "初始化用户文件"
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
-export([
|
-export([
|
||||||
add_default_user/0,
|
add_default_user/0,
|
||||||
default_username/0,
|
default_username/0,
|
||||||
add_bootstrap_user/0
|
add_bootstrap_users/0
|
||||||
]).
|
]).
|
||||||
|
|
||||||
-type emqx_admin() :: #?ADMIN{}.
|
-type emqx_admin() :: #?ADMIN{}.
|
||||||
|
@ -85,16 +85,16 @@ mnesia(boot) ->
|
||||||
add_default_user() ->
|
add_default_user() ->
|
||||||
add_default_user(binenv(default_username), binenv(default_password)).
|
add_default_user(binenv(default_username), binenv(default_password)).
|
||||||
|
|
||||||
-spec add_bootstrap_user() -> ok | {error, _}.
|
-spec add_bootstrap_users() -> ok | {error, _}.
|
||||||
add_bootstrap_user() ->
|
add_bootstrap_users() ->
|
||||||
case emqx:get_config([dashboard, bootstrap_user], undefined) of
|
case emqx:get_config([dashboard, bootstrap_users_file], undefined) of
|
||||||
undefined ->
|
undefined ->
|
||||||
ok;
|
ok;
|
||||||
File ->
|
File ->
|
||||||
case mnesia:table_info(?ADMIN, size) of
|
case mnesia:table_info(?ADMIN, size) of
|
||||||
0 ->
|
0 ->
|
||||||
?SLOG(debug, #{msg => "Add dashboard bootstrap users", file => File}),
|
?SLOG(debug, #{msg => "Add dashboard bootstrap users", file => File}),
|
||||||
add_bootstrap_user(File);
|
add_bootstrap_users(File);
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end
|
end
|
||||||
|
@ -312,7 +312,7 @@ add_default_user(Username, Password) ->
|
||||||
_ -> {ok, default_user_exists}
|
_ -> {ok, default_user_exists}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
add_bootstrap_user(File) ->
|
add_bootstrap_users(File) ->
|
||||||
case file:open(File, [read]) of
|
case file:open(File, [read]) of
|
||||||
{ok, Dev} ->
|
{ok, Dev} ->
|
||||||
{ok, MP} = re:compile(<<"(\.+):(\.+$)">>, [ungreedy]),
|
{ok, MP} = re:compile(<<"(\.+):(\.+$)">>, [ungreedy]),
|
||||||
|
@ -324,7 +324,12 @@ add_bootstrap_user(File) ->
|
||||||
after
|
after
|
||||||
file:close(Dev)
|
file:close(Dev)
|
||||||
end;
|
end;
|
||||||
Error ->
|
{error, Reason} = Error ->
|
||||||
|
?SLOG(error, #{
|
||||||
|
msg => "failed to open the dashboard bootstrap users file",
|
||||||
|
file => File,
|
||||||
|
reason => Reason
|
||||||
|
}),
|
||||||
Error
|
Error
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ start(_StartType, _StartArgs) ->
|
||||||
case emqx_dashboard:start_listeners() of
|
case emqx_dashboard:start_listeners() of
|
||||||
ok ->
|
ok ->
|
||||||
emqx_dashboard_cli:load(),
|
emqx_dashboard_cli:load(),
|
||||||
case emqx_dashboard_admin:add_bootstrap_user() of
|
case emqx_dashboard_admin:add_bootstrap_users() of
|
||||||
ok ->
|
ok ->
|
||||||
{ok, _} = emqx_dashboard_admin:add_default_user(),
|
{ok, _} = emqx_dashboard_admin:add_default_user(),
|
||||||
{ok, Sup};
|
{ok, Sup};
|
||||||
|
|
|
@ -55,7 +55,8 @@ fields("dashboard") ->
|
||||||
)},
|
)},
|
||||||
{cors, fun cors/1},
|
{cors, fun cors/1},
|
||||||
{i18n_lang, fun i18n_lang/1},
|
{i18n_lang, fun i18n_lang/1},
|
||||||
{bootstrap_user, ?HOCON(binary(), #{desc => ?DESC(bootstrap_user), required => false})}
|
{bootstrap_users_file,
|
||||||
|
?HOCON(binary(), #{desc => ?DESC(bootstrap_users_file), required => false})}
|
||||||
];
|
];
|
||||||
fields("listeners") ->
|
fields("listeners") ->
|
||||||
[
|
[
|
||||||
|
|
|
@ -342,11 +342,18 @@ list_listeners(get, #{query_string := Query}) ->
|
||||||
{200, listener_status_by_id(NodeL)}.
|
{200, listener_status_by_id(NodeL)}.
|
||||||
|
|
||||||
crud_listeners_by_id(get, #{bindings := #{id := Id0}}) ->
|
crud_listeners_by_id(get, #{bindings := #{id := Id0}}) ->
|
||||||
Listeners = [
|
Listeners =
|
||||||
Conf#{<<"id">> => Id, <<"type">> => Type}
|
[
|
||||||
|| {Id, Type, Conf} <- emqx_listeners:list_raw(),
|
Conf#{
|
||||||
Id =:= Id0
|
<<"id">> => Id,
|
||||||
],
|
<<"type">> => Type,
|
||||||
|
<<"bind">> := iolist_to_binary(
|
||||||
|
emqx_listeners:format_bind(maps:get(<<"bind">>, Conf))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|| {Id, Type, Conf} <- emqx_listeners:list_raw(),
|
||||||
|
Id =:= Id0
|
||||||
|
],
|
||||||
case Listeners of
|
case Listeners of
|
||||||
[] -> {404, #{code => 'BAD_LISTENER_ID', message => ?LISTENER_NOT_FOUND}};
|
[] -> {404, #{code => 'BAD_LISTENER_ID', message => ?LISTENER_NOT_FOUND}};
|
||||||
[L] -> {200, L}
|
[L] -> {200, L}
|
||||||
|
|
Loading…
Reference in New Issue