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: reboot emqx_license app for join cluster #10820

Merged
merged 2 commits into from
May 29, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
68 changes: 35 additions & 33 deletions apps/emqx_machine/src/emqx_machine_boot.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
-export([stop_port_apps/0]).

-dialyzer({no_match, [basic_reboot_apps/0]}).
-dialyzer({no_match, [basic_reboot_apps_edition/1]}).

-ifdef(TEST).
-export([sorted_reboot_apps/1, reboot_apps/0]).
Expand Down Expand Up @@ -126,39 +127,40 @@ reboot_apps() ->
BaseRebootApps ++ ConfigApps.

basic_reboot_apps() ->
CE =
?BASIC_REBOOT_APPS ++
[
emqx_prometheus,
emqx_modules,
emqx_dashboard,
emqx_connector,
emqx_gateway,
emqx_resource,
emqx_rule_engine,
emqx_bridge,
emqx_plugin_libs,
emqx_management,
emqx_retainer,
emqx_exhook,
emqx_authn,
emqx_authz,
emqx_slow_subs,
emqx_auto_subscribe,
emqx_plugins
],
case emqx_release:edition() of
ce ->
CE ++ [emqx_telemetry];
ee ->
CE ++
[
emqx_s3,
emqx_ft,
emqx_eviction_agent,
emqx_node_rebalance
JimMoen marked this conversation as resolved.
Show resolved Hide resolved
]
end.
?BASIC_REBOOT_APPS ++
[
emqx_prometheus,
emqx_modules,
emqx_dashboard,
emqx_connector,
emqx_gateway,
emqx_resource,
emqx_rule_engine,
emqx_bridge,
emqx_plugin_libs,
emqx_management,
emqx_retainer,
emqx_exhook,
emqx_authn,
emqx_authz,
emqx_slow_subs,
emqx_auto_subscribe,
emqx_plugins
] ++ basic_reboot_apps_edition(emqx_release:edition()).

basic_reboot_apps_edition(ce) ->
[emqx_telemetry];
basic_reboot_apps_edition(ee) ->
[
emqx_license,
emqx_s3,
emqx_ft,
emqx_eviction_agent,
emqx_node_rebalance
];
%% unexcepted edition, should not happen
basic_reboot_apps_edition(_) ->
[].

sorted_reboot_apps() ->
Apps = [{App, app_deps(App)} || App <- reboot_apps()],
Expand Down
6 changes: 6 additions & 0 deletions changes/ce/fix-10820.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
In case the cluster updated license before the new node join in. The new node will not apply the updated license.
After this change, the new joined node will use the cluster's license key.

Sometimes the new node must start with a outdated license.
e.g. use emqx-operator deployed and needed to scale up after license expired.
At the time the cluster's license key already updated by API/CLI, but the new node won't use it.