Merge pull request #8665 from zmstone/chore-sync-dev/v4.3.18-todev/v4.4.7

Chore sync dev/v4.3.18 to dev/v4.4.7
This commit is contained in:
Zaiming (Stone) Shi 2022-08-08 17:35:18 +01:00 committed by GitHub
commit 16edf61b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 54 additions and 8 deletions

View File

@ -177,11 +177,21 @@ relup_test(){
fi fi
./emqx/bin/emqx_ctl status ./emqx/bin/emqx_ctl status
./emqx/bin/emqx versions ./emqx/bin/emqx versions
OldVsn="$(./emqx/bin/emqx eval 'Versions=[{S, V} || {_,V,_, S} <- release_handler:which_releases()],
Current = proplists:get_value(current, Versions, proplists:get_value(permanent, Versions)),
io:format("~s", [Current])')"
cp "${PACKAGE_PATH}/${PROFILE}-${TARGET_VERSION}"-*.zip ./emqx/releases/ cp "${PACKAGE_PATH}/${PROFILE}-${TARGET_VERSION}"-*.zip ./emqx/releases/
./emqx/bin/emqx install "${TARGET_VERSION}" ./emqx/bin/emqx install "${TARGET_VERSION}"
[ "$(./emqx/bin/emqx versions |grep permanent | awk '{print $2}')" = "${TARGET_VERSION}" ] || exit 1 [ "$(./emqx/bin/emqx versions |grep permanent | awk '{print $2}')" = "${TARGET_VERSION}" ] || exit 1
export EMQX_WAIT_FOR_STOP=300 export EMQX_WAIT_FOR_STOP=300
./emqx/bin/emqx_ctl status ./emqx/bin/emqx_ctl status
# also test remove old rel
./emqx/bin/emqx uninstall "$OldVsn"
# check emqx still runs
./emqx/bin/emqx ping
if ! ./emqx/bin/emqx stop; then if ! ./emqx/bin/emqx stop; then
cat emqx/log/erlang.log.1 || true cat emqx/log/erlang.log.1 || true
cat emqx/log/emqx.log.1 || true cat emqx/log/emqx.log.1 || true

View File

@ -67,11 +67,16 @@ jobs:
-d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ github.ref_name }}\" }" \ -d "{\"repo\":\"emqx/emqx\", \"tag\": \"${{ github.ref_name }}\" }" \
${{ secrets.EMQX_IO_RELEASE_API }} ${{ secrets.EMQX_IO_RELEASE_API }}
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
fetch-depth: 0
- name: get version
id: version
run: echo "::set-output name=version::$(./pkg-vsn.sh)"
- uses: emqx/push-helm-action@v1 - uses: emqx/push-helm-action@v1
if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx' if: github.event_name == 'release' && endsWith(github.repository, 'emqx') && matrix.profile == 'emqx'
with: with:
charts_dir: "${{ github.workspace }}/deploy/charts/emqx" charts_dir: "${{ github.workspace }}/deploy/charts/emqx"
version: ${{ github.ref_name }} version: ${{ steps.version.outputs.version }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: "us-west-2" aws_region: "us-west-2"
@ -80,7 +85,7 @@ jobs:
if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee' if: github.event_name == 'release' && endsWith(github.repository, 'enterprise') && matrix.profile == 'emqx-ee'
with: with:
charts_dir: "${{ github.workspace }}/deploy/charts/emqx-ee" charts_dir: "${{ github.workspace }}/deploy/charts/emqx-ee"
version: ${{ github.ref_name }} version: ${{ steps.version.outputs.version }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: "us-west-2" aws_region: "us-west-2"

View File

@ -16,6 +16,8 @@ File format:
- Upgrade Erlang/OTP from 23.2.7.2-emqx-3 to 23.3.4.9-3 [#8511](https://github.com/emqx/emqx/pull/8511) - Upgrade Erlang/OTP from 23.2.7.2-emqx-3 to 23.3.4.9-3 [#8511](https://github.com/emqx/emqx/pull/8511)
- Make possible to debug-print SSL handshake procedure by setting listener config `log_level=debug` [#8553](https://github.com/emqx/emqx/pull/8553) - Make possible to debug-print SSL handshake procedure by setting listener config `log_level=debug` [#8553](https://github.com/emqx/emqx/pull/8553)
- Add option to perform GC on connection process after TLS/SSL handshake is performed. [#8649](https://github.com/emqx/emqx/pull/8649)
Expected to reduce around 35% memory consumption for each SSL connection. See [#8637](https://github.com/emqx/emqx/pull/8637) for more details.
## v4.3.17 ## v4.3.17

View File

@ -2,7 +2,7 @@
{plugins, [rebar3_proper]}. {plugins, [rebar3_proper]}.
{deps, {deps,
[{esockd, {git, "https://github.com/emqx/esockd", {tag, "5.8.5"}}}, [{esockd, {git, "https://github.com/emqx/esockd", {tag, "5.8.7"}}},
{cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v3.0.0"}}} {cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v3.0.0"}}}
]}. ]}.

View File

@ -111,6 +111,7 @@ uninstall({_RelName, NameTypeArg, NodeName, Cookie}, Opts) ->
TargetNode = start_distribution(NodeName, NameTypeArg, Cookie), TargetNode = start_distribution(NodeName, NameTypeArg, Cookie),
WhichReleases = which_releases(TargetNode), WhichReleases = which_releases(TargetNode),
Version = proplists:get_value(version, Opts), Version = proplists:get_value(version, Opts),
ensure_latest_boot_file(current_release_version(TargetNode)),
case proplists:get_value(Version, WhichReleases) of case proplists:get_value(Version, WhichReleases) of
undefined -> undefined ->
?INFO("Release ~s is already uninstalled.", [Version]); ?INFO("Release ~s is already uninstalled.", [Version]);
@ -362,6 +363,9 @@ permafy(TargetNode, RelName, Vsn) ->
[{ok, _} = file:copy(filename:join(["bin", File++"-"++Vsn]), [{ok, _} = file:copy(filename:join(["bin", File++"-"++Vsn]),
filename:join(["bin", File])) filename:join(["bin", File]))
|| File <- Scripts], || File <- Scripts],
ensure_latest_boot_file(Vsn),
%% update the vars %% update the vars
UpdatedVars = io_lib:format("REL_VSN=\"~s\"~nERTS_VSN=\"~s\"~n", [Vsn, erts_vsn()]), UpdatedVars = io_lib:format("REL_VSN=\"~s\"~nERTS_VSN=\"~s\"~n", [Vsn, erts_vsn()]),
file:write_file(filename:absname(filename:join(["releases", "emqx_vars"])), UpdatedVars, [append]). file:write_file(filename:absname(filename:join(["releases", "emqx_vars"])), UpdatedVars, [append]).
@ -458,3 +462,9 @@ str(A) when is_binary(A) ->
binary_to_list(A); binary_to_list(A);
str(A) when is_list(A) -> str(A) when is_list(A) ->
(A). (A).
%%% For otp upgrade, the boot file need match the otp version
%%% This is for emqx cli tool
ensure_latest_boot_file(Vsn) ->
{ok, _} = file:copy(filename:join(["releases", Vsn, "no_dot_erlang.boot"]),
filename:join(["bin", "no_dot_erlang.boot"])).

View File

@ -1649,6 +1649,13 @@ listener.ssl.external.ciphers = TLS_AES_256_GCM_SHA384,TLS_AES_128_GCM_SHA256,TL
## Value: true | false ## Value: true | false
listener.ssl.external.reuseaddr = true listener.ssl.external.reuseaddr = true
## Whether to perform GC after TLS/SSL handshake.
##
## Default: false
##
## Value: true | false
## listener.ssl.external.gc_after_handshake = false
##-------------------------------------------------------------------- ##--------------------------------------------------------------------
## External WebSocket listener for MQTT protocol ## External WebSocket listener for MQTT protocol

View File

@ -1641,6 +1641,11 @@ end}.
{datatype, {enum, [emergency, alert, critical, error, warning, notice, info, debug, none, all]}} {datatype, {enum, [emergency, alert, critical, error, warning, notice, info, debug, none, all]}}
]}. ]}.
{mapping, "listener.ssl.$name.gc_after_handshake", "emqx.listeners", [
{default, false},
{datatype, {enum, [true, false]}}
]}.
%%-------------------------------------------------------------------- %%--------------------------------------------------------------------
%% MQTT/WebSocket Listeners %% MQTT/WebSocket Listeners
@ -2263,7 +2268,8 @@ end}.
{secure_renegotiate, cuttlefish:conf_get(Prefix ++ ".secure_renegotiate", Conf, undefined)}, {secure_renegotiate, cuttlefish:conf_get(Prefix ++ ".secure_renegotiate", Conf, undefined)},
{reuse_sessions, cuttlefish:conf_get(Prefix ++ ".reuse_sessions", Conf, undefined)}, {reuse_sessions, cuttlefish:conf_get(Prefix ++ ".reuse_sessions", Conf, undefined)},
{honor_cipher_order, cuttlefish:conf_get(Prefix ++ ".honor_cipher_order", Conf, undefined)}, {honor_cipher_order, cuttlefish:conf_get(Prefix ++ ".honor_cipher_order", Conf, undefined)},
{log_level, cuttlefish:conf_get(Prefix ++ ".log_level", Conf, undefined)} {log_level, cuttlefish:conf_get(Prefix ++ ".log_level", Conf, undefined)},
{gc_after_handshake, cuttlefish:conf_get(Prefix ++ ".gc_after_handshake", Conf, undefined)}
]) ])
end, end,

View File

@ -45,7 +45,7 @@
, {gproc, {git, "https://github.com/uwiger/gproc", {tag, "0.8.0"}}} , {gproc, {git, "https://github.com/uwiger/gproc", {tag, "0.8.0"}}}
, {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}} , {jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}
, {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}} , {cowboy, {git, "https://github.com/emqx/cowboy", {tag, "2.9.0"}}}
, {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.8.6"}}} , {esockd, {git, "https://github.com/emqx/esockd", {tag, "5.8.7"}}}
, {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.8.1.11"}}} , {ekka, {git, "https://github.com/emqx/ekka", {tag, "0.8.1.11"}}}
, {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.7.1"}}} , {gen_rpc, {git, "https://github.com/emqx/gen_rpc", {tag, "2.7.1"}}}
, {cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v3.3.6"}}} , {cuttlefish, {git, "https://github.com/emqx/cuttlefish", {tag, "v3.3.6"}}}

View File

@ -1,4 +1,5 @@
#!/usr/bin/env -S escript -c #!/usr/bin/env escript
%% This script is part of 'relup' process to overwrite the OTP app versions (incl. ERTS) in rel files from upgrade base %% This script is part of 'relup' process to overwrite the OTP app versions (incl. ERTS) in rel files from upgrade base
%% so that 'rebar relup' call will not generate instructions for restarting OTP apps or restarting the emulator. %% so that 'rebar relup' call will not generate instructions for restarting OTP apps or restarting the emulator.
%% %%
@ -8,6 +9,8 @@
%% note, we use NEW to overwrite OLD is because the modified NEW rel file will be overwritten by next 'rebar relup' %% note, we use NEW to overwrite OLD is because the modified NEW rel file will be overwritten by next 'rebar relup'
%% %%
-mode(compile).
main([Dir, RelVsn, BASE_VERSIONS]) -> main([Dir, RelVsn, BASE_VERSIONS]) ->
{ErtsVsn, Overwrites} = get_otp_apps(rel_file(Dir, RelVsn), RelVsn), {ErtsVsn, Overwrites} = get_otp_apps(rel_file(Dir, RelVsn), RelVsn),
lists:foreach(fun(BaseVer) -> lists:foreach(fun(BaseVer) ->

View File

@ -1,5 +1,7 @@
#!/usr/bin/env -S escript -c #!/usr/bin/env -S escript -c
-mode(compile).
main(_) -> main(_) ->
OtpRelease = list_to_integer(erlang:system_info(otp_release)), OtpRelease = list_to_integer(erlang:system_info(otp_release)),
case OtpRelease < 21 of case OtpRelease < 21 of
@ -9,4 +11,3 @@ main(_) ->
false -> false ->
ok ok
end. end.

View File

@ -1,6 +1,8 @@
#!/usr/bin/env -S escript -c #!/usr/bin/env escript
%% -*- erlang-indent-level:4 -*- %% -*- erlang-indent-level:4 -*-
-mode(compile).
usage() -> usage() ->
"A script that fills in boilerplate for appup files. "A script that fills in boilerplate for appup files.