Просмотр исходного кода

Merge pull request #10048 from zmstone/0301-merge-release-50-to-master

0301 merge release 50 to master
Zaiming (Stone) Shi 2 лет назад
Родитель
Сommit
43bedf1d4c

+ 1 - 1
apps/emqx/include/emqx_release.hrl

@@ -32,7 +32,7 @@
 %% `apps/emqx/src/bpapi/README.md'
 
 %% Community edition
--define(EMQX_RELEASE_CE, "5.0.18").
+-define(EMQX_RELEASE_CE, "5.0.19").
 
 %% Enterprise edition
 -define(EMQX_RELEASE_EE, "5.0.1-beta.1").

+ 1 - 0
apps/emqx/test/emqx_quic_multistreams_SUITE.erl

@@ -152,6 +152,7 @@ init_per_suite(Config) ->
 
 end_per_suite(Config) ->
     emqx_config:put_zone_conf(default, [force_shutdown], ?config(shutdown_policy, Config)),
+    emqx_common_test_helpers:stop_apps([]),
     ok.
 
 init_per_group(pub_qos0, Config) ->

+ 20 - 1
apps/emqx_management/src/emqx_mgmt.erl

@@ -141,9 +141,28 @@ node_info() ->
         uptime => proplists:get_value(uptime, BrokerInfo),
         version => iolist_to_binary(proplists:get_value(version, BrokerInfo)),
         edition => emqx_release:edition_longstr(),
-        role => mria_rlog:role()
+        role => mria_rlog:role(),
+        log_path => log_path(),
+        sys_path => iolist_to_binary(code:root_dir())
     }.
 
+log_path() ->
+    RootDir = code:root_dir(),
+    Configs = logger:get_handler_config(),
+    case get_log_path(Configs) of
+        undefined ->
+            <<"log.file_handler.default.enable is false, not logging to file.">>;
+        Path ->
+            iolist_to_binary(filename:join(RootDir, Path))
+    end.
+
+get_log_path([#{config := #{file := Path}} | _LoggerConfigs]) ->
+    filename:dirname(Path);
+get_log_path([_LoggerConfig | LoggerConfigs]) ->
+    get_log_path(LoggerConfigs);
+get_log_path([]) ->
+    undefined.
+
 get_sys_memory() ->
     case os:type() of
         {unix, linux} ->

+ 4 - 23
apps/emqx_management/src/emqx_mgmt_api_nodes.erl

@@ -293,31 +293,12 @@ get_stats(Node) ->
 %% internal function
 
 format(_Node, Info = #{memory_total := Total, memory_used := Used}) ->
-    RootDir = list_to_binary(code:root_dir()),
-    LogPath =
-        case log_path() of
-            undefined ->
-                <<"log.file_handler.default.enable is false,only log to console">>;
-            Path ->
-                filename:join(RootDir, Path)
-        end,
     Info#{
         memory_total := emqx_mgmt_util:kmg(Total),
-        memory_used := emqx_mgmt_util:kmg(Used),
-        sys_path => RootDir,
-        log_path => LogPath
-    }.
-
-log_path() ->
-    Configs = logger:get_handler_config(),
-    get_log_path(Configs).
-
-get_log_path([#{config := #{file := Path}} | _LoggerConfigs]) ->
-    filename:dirname(Path);
-get_log_path([_LoggerConfig | LoggerConfigs]) ->
-    get_log_path(LoggerConfigs);
-get_log_path([]) ->
-    undefined.
+        memory_used := emqx_mgmt_util:kmg(Used)
+    };
+format(_Node, Info) when is_map(Info) ->
+    Info.
 
 node_error() ->
     emqx_dashboard_swagger:error_codes([?SOURCE_ERROR], <<"Node error">>).

+ 1 - 0
changes/ce/fix-10044.en.md

@@ -0,0 +1 @@
+Fix node information formatter for stopped nodes in the cluster.

+ 1 - 0
changes/ce/fix-10044.zh.md

@@ -0,0 +1 @@
+修复 v5.0.18 引入的一个节点信息序列化时发生的错误。

+ 3 - 1
changes/v5.0.18.en.md

@@ -7,7 +7,9 @@
 - [#9213](https://github.com/emqx/emqx/pull/9213) Add pod disruption budget to helm chart
 
 - [#9949](https://github.com/emqx/emqx/pull/9949) QUIC transport Multistreams support and QUIC TLS cacert support.
-  
+
+- [#9966](https://github.com/emqx/emqx/pull/9966) Add two new Erlang apps 'tools' and 'covertool' to the release.
+  So we can run profiling and test coverage analysis on release packages.
 
 - [#9967](https://github.com/emqx/emqx/pull/9967) New common TLS option 'hibernate_after' to reduce memory footprint per idle connecion, default: 5s.
 

+ 3 - 0
changes/v5.0.18.zh.md

@@ -8,6 +8,9 @@
 
 - [#9949](https://github.com/emqx/emqx/pull/9949) QUIC 传输多流支持和 QUIC TLS cacert 支持。
 
+- [#9966](https://github.com/emqx/emqx/pull/9966) 在发布包中增加了2个新的 Erlang app,分别是 ‘tools’ 和 ‘covertool’。
+  这两个 app 可以用于性能和测试覆盖率的分析。
+
 - [#9967](https://github.com/emqx/emqx/pull/9967) 新的通用 TLS 选项 'hibernate_after', 以减少空闲连接的内存占用,默认: 5s 。
 
 ## 修复

+ 0 - 2
changes/v5.0.18/fix-9966.en.md

@@ -1,2 +0,0 @@
-Add two new Erlang apps 'tools' and 'covertool' to the release.
-So we can run profiling and test coverage analysis on release packages.

+ 0 - 2
changes/v5.0.18/fix-9966.zh.md

@@ -1,2 +0,0 @@
-在发布包中增加了2个新的 Erlang app,分别是 ‘tools’ 和 ‘covertool’。
-这两个 app 可以用于性能和测试覆盖率的分析。

+ 23 - 0
changes/v5.0.19.en.md

@@ -0,0 +1,23 @@
+# v5.0.19
+
+## Bug Fixes
+
+- [#10032](https://github.com/emqx/emqx/pull/10032) When the resource manager is busy trying to establish a connection with the remote, the resource might yet lack any metrics information. Prior to this fix, the `bridges/` API handler crashed in such circumstances.
+
+- [#10037](https://github.com/emqx/emqx/pull/10037) Fix Swagger API doc rendering crash.
+  In version 5.0.18, a bug was introduced that resulted in duplicated field names in the configuration schema. This, in turn, caused the Swagger schema generated to become invalid.
+
+- [#10041](https://github.com/emqx/emqx/pull/10041) For influxdb bridge, added integer value placeholder annotation hint to `write_syntax` documentation.
+  Also supported setting a constant value for the `timestamp` field.
+
+- [#10042](https://github.com/emqx/emqx/pull/10042) Improve behavior of the `replicant` nodes when the `core` cluster becomes partitioned (for example when a core node leaves the cluster).
+  Previously, the replicant nodes were unable to rebalance connections to the core nodes, until the core cluster became whole again.
+  This was indicated by the error messages: `[error] line: 182, mfa: mria_lb:list_core_nodes/1, msg: mria_lb_core_discovery divergent cluster`.
+
+  [Mria PR](https://github.com/emqx/mria/pull/123/files)
+
+- [#10043](https://github.com/emqx/emqx/pull/10043) Fixed two bugs introduced in v5.0.18.
+  * The environment varialbe `SSL_DIST_OPTFILE` was not set correctly for non-boot commands.
+  * When cookie is overridden from environment variable, EMQX node is unable to start.
+
+- [#10044](https://github.com/emqx/emqx/pull/10044) Fix node information formatter for stopped nodes in the cluster.

+ 24 - 0
changes/v5.0.19.zh.md

@@ -0,0 +1,24 @@
+# v5.0.19
+
+## 修复
+
+- [#10032](https://github.com/emqx/emqx/pull/10032) 当资源管理器忙于尝试与远程建立连接时,资源可能还缺少任何度量信息。 在此修复之前,`bridges/' API 处理程序在这种情况下崩溃。
+
+- [#10037](https://github.com/emqx/emqx/pull/10037) 修复 Swagger API 文档渲染崩溃。
+  在版本 5.0.18 中,引入了一个错误,导致配置 schema 中出现了重复的配置名称,进而导致生成了无效的 Swagger spec。
+
+- [#10041](https://github.com/emqx/emqx/pull/10041) 为 influxdb 桥接的配置项 `write_syntax` 描述文档增加了类型标识符的提醒。
+  另外在配置中支持 `timestamp` 使用一个常量。
+
+- [#10042](https://github.com/emqx/emqx/pull/10042) 改进 `core` 集群被分割时 `replicant`节点的行为。
+  修复前,如果 `core` 集群分裂成两个小集群(例如一个节点离开集群)时,`replicant` 节点无法重新平衡与核心节点的连接,直到核心集群再次变得完整。
+  这种个问题会导致 replicant 节点出现如下日志:
+  `[error] line: 182, mfa: mria_lb:list_core_nodes/1, msg: mria_lb_core_discovery divergent cluster`。
+
+  [Mria PR](https://github.com/emqx/mria/pull/123/files)
+
+- [#10043](https://github.com/emqx/emqx/pull/10043) 修复 v5.0.18 引入的 2 个bug。
+  * 环境变量 `SSL_DIST_OPTFILE` 的值设置错误导致节点无法为 Erlang distribution 启用 SSL。
+  * 当节点的 cookie 从环境变量重载 (而不是设置在配置文件中时),节点无法启动的问题。
+
+- [#10044](https://github.com/emqx/emqx/pull/10044) 修复 v5.0.18 引入的一个节点信息序列化时发生的错误。

+ 2 - 2
deploy/charts/emqx/Chart.yaml

@@ -14,8 +14,8 @@ type: application
 
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
-version: 5.0.18
+version: 5.0.19
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application.
-appVersion: 5.0.18
+appVersion: 5.0.19