Merge pull request #9265 from qzhuyan/upgrade/william/vsn-4.4-otp-upgrade

Upgrade/william/vsn 4.4 otp upgrade
This commit is contained in:
Zaiming (Stone) Shi 2022-11-01 13:49:29 +01:00 committed by GitHub
commit 2d5b3a2e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 61 additions and 40 deletions

View File

@ -9,11 +9,11 @@ jobs:
strategy: strategy:
matrix: matrix:
erl_otp: erl_otp:
- 24.1.5-3 - 24.3.4.2-1
os: os:
- ubuntu20.04 - ubuntu20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:${{ matrix.erl_otp }}-${{ matrix.os }} container: ghcr.io/emqx/emqx-builder/4.4-20:${{ matrix.erl_otp }}-${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -21,7 +21,7 @@ jobs:
if: endsWith(github.repository, 'emqx') if: endsWith(github.repository, 'emqx')
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# prepare source with any OTP version, no need for a matrix # prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
outputs: outputs:
profiles: ${{ steps.detect-profiles.outputs.profiles}} profiles: ${{ steps.detect-profiles.outputs.profiles}}
@ -60,7 +60,7 @@ jobs:
matrix: matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}} profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp: otp:
- 24.2.1 - 24.3.4.2
exclude: exclude:
- profile: emqx-edge - profile: emqx-edge
steps: steps:
@ -108,7 +108,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
os: os:
- macos-11 - macos-11
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -153,7 +153,7 @@ jobs:
- zip - zip
- pkg - pkg
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
arch: arch:
- amd64 - amd64
- arm64 - arm64
@ -210,7 +210,7 @@ jobs:
--profile "${PROFILE}" \ --profile "${PROFILE}" \
--pkgtype "${PACKAGE}" \ --pkgtype "${PACKAGE}" \
--arch "${ARCH}" \ --arch "${ARCH}" \
--builder "ghcr.io/emqx/emqx-builder/4.4-19:${OTP}-${SYSTEM}" --builder "ghcr.io/emqx/emqx-builder/4.4-20:${OTP}-${SYSTEM}"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: ${{ matrix.profile }}-${{ matrix.otp }} name: ${{ matrix.profile }}-${{ matrix.otp }}
@ -225,7 +225,7 @@ jobs:
matrix: matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}} profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
registry: registry:
- 'docker.io' - 'docker.io'
- 'public.ecr.aws' - 'public.ecr.aws'
@ -286,7 +286,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-19:${{ matrix.otp }}-alpine3.15.1 BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-20:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1 RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ matrix.profile }} EMQX_NAME=${{ matrix.profile }}
file: source/deploy/docker/Dockerfile file: source/deploy/docker/Dockerfile
@ -302,7 +302,7 @@ jobs:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
build-args: | build-args: |
BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-19:${{ matrix.otp }}-alpine3.15.1 BUILD_FROM=ghcr.io/emqx/emqx-builder/4.4-20:${{ matrix.otp }}-alpine3.15.1
RUN_FROM=alpine:3.15.1 RUN_FROM=alpine:3.15.1
EMQX_NAME=${{ matrix.profile }} EMQX_NAME=${{ matrix.profile }}
file: source/deploy/docker/Dockerfile.enterprise file: source/deploy/docker/Dockerfile.enterprise
@ -320,7 +320,7 @@ jobs:
matrix: matrix:
profile: ${{fromJSON(needs.prepare.outputs.profiles)}} profile: ${{fromJSON(needs.prepare.outputs.profiles)}}
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
include: include:
- profile: emqx - profile: emqx
otp: windows # otp version on windows is rather fixed otp: windows # otp version on windows is rather fixed

View File

@ -17,7 +17,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
os: os:
- ubuntu20.04 - ubuntu20.04
- el8 - el8
@ -32,7 +32,7 @@ jobs:
- runs-on: aws-amd64 - runs-on: aws-amd64
use-self-hosted: false use-self-hosted: false
container: ghcr.io/emqx/emqx-builder/4.4-19:${{ matrix.otp }}-${{ matrix.os }} container: ghcr.io/emqx/emqx-builder/4.4-20:${{ matrix.otp }}-${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
@ -78,7 +78,7 @@ jobs:
profile: profile:
- emqx - emqx
otp: otp:
- 24.2.1 - 24.3.4.2
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1 - uses: ilammy/msvc-dev-cmd@v1
@ -111,7 +111,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
os: os:
- macos-11 - macos-11
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -5,7 +5,7 @@ on: [pull_request]
jobs: jobs:
check_deps_integrity: check_deps_integrity:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -7,7 +7,7 @@ on:
jobs: jobs:
prepare: prepare:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
outputs: outputs:
profiles: ${{ steps.detect-profiles.outputs.profiles}} profiles: ${{ steps.detect-profiles.outputs.profiles}}

View File

@ -5,7 +5,7 @@ on: workflow_dispatch
jobs: jobs:
test: test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
strategy: strategy:
fail-fast: true fail-fast: true
env: env:

View File

@ -200,7 +200,7 @@ jobs:
relup_test_plan: relup_test_plan:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
outputs: outputs:
profile: ${{ steps.profile-and-versions.outputs.profile }} profile: ${{ steps.profile-and-versions.outputs.profile }}
vsn: ${{ steps.profile-and-versions.outputs.vsn }} vsn: ${{ steps.profile-and-versions.outputs.vsn }}
@ -249,9 +249,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
otp: otp:
- 24.1.5-3 - 24.3.4.2-1
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
defaults: defaults:
run: run:
shell: bash shell: bash
@ -280,19 +280,19 @@ jobs:
path: | path: |
emqx/_packages/*/*.zip emqx/_packages/*/*.zip
emqx/.ci/fvt_tests emqx/.ci/fvt_tests
emqx/data/relup-paths.eterm
emqx/scripts/relup-base-vsns.escript
relup_test_run: relup_test_run:
needs: needs:
- relup_test_plan - relup_test_plan
- relup_test_build - relup_test_build
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
old_vsn: ${{ fromJson(needs.relup_test_plan.outputs.matrix) }} old_vsn: ${{ fromJson(needs.relup_test_plan.outputs.matrix) }}
otp:
- 24.1.5-3
env: env:
OLD_VSN: "${{ matrix.old_vsn }}" OLD_VSN: "${{ matrix.old_vsn }}"
PROFILE: "${{ needs.relup_test_plan.outputs.profile }}" PROFILE: "${{ needs.relup_test_plan.outputs.profile }}"
@ -313,16 +313,14 @@ jobs:
repository: terry-xiaoyu/one_more_emqx repository: terry-xiaoyu/one_more_emqx
ref: master ref: master
path: one_more_emqx path: one_more_emqx
- name: Prepare packages - name: Run relup test scenario
timeout-minutes: 6
run: | run: |
set -e -x -u set -e -x -u
mkdir -p packages old_emqx_vsn=${OLD_VSN#[e|v]}
old_otp_vsn=$(escript emqx_built/scripts/relup-base-vsns.escript otp-vsn-for "${old_emqx_vsn}" emqx_built/data/relup-paths.eterm)
wget --no-verbose -P packages https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$OLD_VSN/$PROFILE-${old_emqx_vsn}-otp${old_otp_vsn}-ubuntu20.04-amd64.zip
cp emqx_built/_packages/*/*.zip packages cp emqx_built/_packages/*/*.zip packages
cd packages
wget --no-verbose https://s3-us-west-2.amazonaws.com/packages.emqx/$BROKER/$OLD_VSN/$PROFILE-${OLD_VSN#[e|v]}-otp${{ matrix.otp }}-ubuntu20.04-amd64.zip
- name: Run relup test scenario
timeout-minutes: 5
run: |
lux \ lux \
--progress verbose \ --progress verbose \
--case_timeout infinity \ --case_timeout infinity \
@ -331,8 +329,8 @@ jobs:
--var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \ --var ONE_MORE_EMQX_PATH=$(pwd)/one_more_emqx \
--var VSN="$VSN" \ --var VSN="$VSN" \
--var OLD_VSN="$OLD_VSN" \ --var OLD_VSN="$OLD_VSN" \
--var FROM_OTP_VSN="24.1.5-3" \ --var FROM_OTP_VSN="${old_otp_vsn}" \
--var TO_OTP_VSN="24.1.5-3" \ --var TO_OTP_VSN="24.3.4.2-1" \
emqx_built/.ci/fvt_tests/relup.lux emqx_built/.ci/fvt_tests/relup.lux
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
name: Save debug data name: Save debug data

View File

@ -12,7 +12,7 @@ on:
jobs: jobs:
run_proper_test: run_proper_test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ghcr.io/emqx/emqx-builder/4.4-19:24.1.5-3-ubuntu20.04 container: ghcr.io/emqx/emqx-builder/4.4-20:24.3.4.2-1-ubuntu20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2

11
build
View File

@ -77,8 +77,13 @@ make_relup() {
local zip_file local zip_file
mkdir -p "$lib_dir" "$releases_dir" '_upgrade_base' mkdir -p "$lib_dir" "$releases_dir" '_upgrade_base'
local releases=() local releases=()
local OTP_CHANGED='no'
if [ -d "$releases_dir" ]; then if [ -d "$releases_dir" ]; then
for BASE_VSN in $(relup_db base-vsns "$PKG_VSN"); do for BASE_VSN in $(relup_db base-vsns "$PKG_VSN"); do
OTP_BASE=$(relup_db otp-vsn-for "$BASE_VSN")
if [[ "$OTP_BASE" != "$OTP_VSN" ]]; then
OTP_CHANGED='yes'
fi
OTP_BASE=$(relup_db otp-vsn-for "$PKG_VSN") OTP_BASE=$(relup_db otp-vsn-for "$PKG_VSN")
zip_file="_upgrade_base/${PROFILE}-$(env OTP_VSN="$OTP_BASE" PKG_VSN="$BASE_VSN" ./scripts/pkg-full-vsn.sh 'vsn_exact').zip" zip_file="_upgrade_base/${PROFILE}-$(env OTP_VSN="$OTP_BASE" PKG_VSN="$BASE_VSN" ./scripts/pkg-full-vsn.sh 'vsn_exact').zip"
if [ ! -d "$releases_dir/$BASE_VSN" ]; then if [ ! -d "$releases_dir/$BASE_VSN" ]; then
@ -99,8 +104,8 @@ make_relup() {
fi fi
RELX_BASE_VERSIONS="$(IFS=, ; echo "${releases[*]}")" RELX_BASE_VERSIONS="$(IFS=, ; echo "${releases[*]}")"
export RELX_BASE_VERSIONS export RELX_BASE_VERSIONS
if [[ ${PKG_VSN} == 4.3* ]]; then if [[ ${PKG_VSN} == 4.[3,4]* && ${OTP_CHANGED} == 'yes' ]]; then
echo "EMQX 4.3 specific, overwrite OTP app versions" echo "EMQX 4.[3,4] specific, overwrite OTP app versions"
local emqx_rel_file="${releases_dir}/${PKG_VSN}/emqx.rel" local emqx_rel_file="${releases_dir}/${PKG_VSN}/emqx.rel"
if [ ! -f "${emqx_rel_file}" ]; then if [ ! -f "${emqx_rel_file}" ]; then
./rebar3 as "${PROFILE}" release ./rebar3 as "${PROFILE}" release
@ -118,7 +123,7 @@ make_relup() {
# rollback rel file per releases # rollback rel file per releases
# #
if [[ ${PKG_VSN} == 4.3* ]]; then if [[ ${PKG_VSN} == 4.[3,4]* && ${OTP_CHANGED} == 'yes' ]]; then
echo "restore upgrade base rel files... " echo "restore upgrade base rel files... "
for rel in ${releases[*]}; for rel in ${releases[*]};
do do

View File

@ -1,5 +1,11 @@
### Enhancements ### Enhancements
- OTP upgrade from 24.1.5-3 to 24.3.4.2-1 [#9265](https://github.com/emqx/emqx/pull/9265).
Change highlights:
- Erlang/OTP [SSL library vulnerability fix](https://nvd.nist.gov/vuln/detail/CVE-2022-37026)
- Added support for OCSP (Online Certificate Status Protocol) Stapling
- Added CRL (Certificate Revocation List) cache auto refresh
### Bug fixes ### Bug fixes
- Fix get trace list crash when trace not initialize. [#9156](https://github.com/emqx/emqx/pull/9156) - Fix get trace list crash when trace not initialize. [#9156](https://github.com/emqx/emqx/pull/9156)

View File

@ -1,5 +1,10 @@
### 增强 ### 增强
- OTP 升级: 从 24.1.5-3 至 24.3.4.2-1 [#9265](https://github.com/emqx/emqx/pull/9265)。
重要更新:
- Erlang/OTP [SSL库漏洞修复](https://nvd.nist.gov/vuln/detail/CVE-2022-37026)
- 增加了对 OCSP (Online Certificate Status Protocol) Stapling 的支持
- 增加了 CRL证书吊销列表缓存的自动刷新功能
### 修复 ### 修复

View File

@ -39,6 +39,13 @@
[<<"4.4.0">>,<<"4.4.1">>,<<"4.4.2">>,<<"4.4.3">>,<<"4.4.4">>, [<<"4.4.0">>,<<"4.4.1">>,<<"4.4.2">>,<<"4.4.3">>,<<"4.4.4">>,
<<"4.4.5">>,<<"4.4.6">>,<<"4.4.7">>,<<"4.4.8">>,<<"4.4.9">>], <<"4.4.5">>,<<"4.4.6">>,<<"4.4.7">>,<<"4.4.8">>,<<"4.4.9">>],
otp => <<"24.1.5-3">>}}. otp => <<"24.1.5-3">>}}.
{<<"4.5.0">>, {<<"4.4.11">>,
#{from_versions => [<<"4.4.10">>,<<"4.4.8">>,<<"4.4.9">>], #{from_versions =>
[<<"4.4.0">>,<<"4.4.1">>,<<"4.4.2">>,<<"4.4.3">>,<<"4.4.4">>,
<<"4.4.5">>,<<"4.4.6">>,<<"4.4.7">>,<<"4.4.8">>,<<"4.4.9">>,
<<"4.4.10">>],
otp => <<"24.3.4.2-1">>}}.
{<<"4.5.0">>,
#{from_versions => [<<"4.4.8">>,<<"4.4.9">>,<<"4.4.10">>,
<<"4.4.11">>],
otp => <<"24.3.4.2-1">>}}. otp => <<"24.3.4.2-1">>}}.