diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index 07c0a8fb9..7c43f38c4 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -103,10 +103,13 @@ jobs: sudo chmod 700 get_helm.sh sudo ./get_helm.sh helm version - - name: setup emqx chart + - name: run emqx on chart + timeout-minutes: 5 run: | - minikube image load ${TARGET}:${EMQX_TAG} - sed -i -r "s/^appVersion: .*$/appVersion: \"${EMQX_TAG}\"/g" deploy/charts/emqx/Chart.yaml + version=$(./pkg-vsn.sh) + minikube image load ${TARGET}:$version + + sed -i -r "s/^appVersion: .*$/appVersion: \"${version}\"/g" deploy/charts/emqx/Chart.yaml sed -i '/emqx_telemetry/d' deploy/charts/emqx/values.yaml - name: run emqx on chart if: matrix.discovery == 'k8s' diff --git a/CHANGES-4.3.md b/CHANGES-4.3.md index ce20fa108..bb44325f0 100644 --- a/CHANGES-4.3.md +++ b/CHANGES-4.3.md @@ -34,6 +34,7 @@ File format: - Fix ExHook can't be un-hooked if the grpc service stop first. [#8725](https://github.com/emqx/emqx/pull/8725) - Fix the problem that ExHook cannot continue hook chains execution for mismatched topics. [#8807](https://github.com/emqx/emqx/pull/8807) - Fix GET `/listeners/` crashes when listener is not ready. [#8752](https://github.com/emqx/emqx/pull/8752) +- Fix repeated warning messages in bin/emqx [#8824](https://github.com/emqx/emqx/pull/8824) ## v4.3.18 diff --git a/apps/emqx_auth_mnesia/src/emqx_acl_mnesia_cli.erl b/apps/emqx_auth_mnesia/src/emqx_acl_mnesia_cli.erl index 44850d6a6..34f9777b9 100644 --- a/apps/emqx_auth_mnesia/src/emqx_acl_mnesia_cli.erl +++ b/apps/emqx_auth_mnesia/src/emqx_acl_mnesia_cli.erl @@ -119,6 +119,7 @@ cli(_) -> emqx_ctl:usage([ {"acl list clientid", "List clientid acls"} , {"acl list username", "List username acls"} , {"acl list _all", "List $all acls"} + , {"acl list ", "List all acls"} , {"acl show clientid ", "Lookup clientid acl detail"} , {"acl show username ", "Lookup username acl detail"} , {"acl aad clientid ", "Add clientid acl"} diff --git a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.appup.src b/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.appup.src index 8fa8384d4..7906449db 100644 --- a/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.appup.src +++ b/apps/emqx_auth_mnesia/src/emqx_auth_mnesia.appup.src @@ -1,13 +1,15 @@ %% -*- mode: erlang -*- %% Unless you know what you are doing, DO NOT edit manually!! {VSN, - [{<<"4\\.3\\.7">>, - [{load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}]}, + [{"4.3.7", + [{load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}]}, {<<"4\\.3\\.[5-6]">>, [{load_module,emqx_auth_mnesia_app,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia_db,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia_api,brutal_purge,soft_purge,[]}]}, {<<"4\\.3\\.[0-3]">>, [{load_module,emqx_auth_mnesia_cli,brutal_purge,soft_purge,[]}, @@ -28,14 +30,18 @@ {load_module,emqx_acl_mnesia_api,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia_app,brutal_purge,soft_purge,[]}]}, {<<".*">>,[]}], - [{"4.3.7",[{load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}]}, + [{"4.3.7", + [{load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}]}, {<<"4\\.3\\.[5-6]">>, [{load_module,emqx_auth_mnesia_app,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia_api,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia_db,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia_api,brutal_purge,soft_purge,[]}]}, {<<"4\\.3\\.[0-3]">>, [{load_module,emqx_auth_mnesia_cli,brutal_purge,soft_purge,[]}, @@ -56,5 +62,6 @@ {load_module,emqx_auth_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia_db,brutal_purge,soft_purge,[]}, {load_module,emqx_acl_mnesia,brutal_purge,soft_purge,[]}, + {load_module,emqx_acl_mnesia_cli,brutal_purge,soft_purge,[]}, {load_module,emqx_auth_mnesia_app,brutal_purge,soft_purge,[]}]}, {<<".*">>,[]}]}. diff --git a/bin/emqx b/bin/emqx index f26ec5479..a27db494d 100755 --- a/bin/emqx +++ b/bin/emqx @@ -42,49 +42,6 @@ ERTS_LIB_DIR="$ERTS_DIR/../lib" # the 'x' attributes may get lost if the files are extracted from a relup package find "$BINDIR" -exec chmod a+x {} \; -# Echo to stderr on errors -echoerr() { echo "$*" 1>&2; } - -die() { - set +x - echoerr "ERROR: $1" - errno=${2:-1} - exit "$errno" -} - -assert_node_alive() { - if ! relx_nodetool "ping" > /dev/null; then - die "node_is_not_running!" 1 - fi -} - -check_erlang_start() { - # set ERL_CRASH_DUMP_BYTES to zero so it will not write a crash dump file - env ERL_CRASH_DUMP_BYTES=0 "$BINDIR/$PROGNAME" -boot "$REL_DIR/start_clean" -eval "crypto:start(),halt()" -} - -if ! check_erlang_start >/dev/null 2>&1; then - BUILT_ON="$(head -1 "${REL_DIR}/BUILT_ON")" - ## failed to start, might be due to missing libs, try to be portable - export LD_LIBRARY_PATH="$DYNLIBS_DIR:$LD_LIBRARY_PATH" - if ! check_erlang_start; then - ## it's hopeless - echoerr "FATAL: Unable to start Erlang." - echoerr "Please make sure openssl-1.1.1 (libcrypto) and libncurses are installed." - echoerr "Also ensure it's running on the correct platform," - echoerr "this EMQX release is built for $BUILT_ON" - exit 1 - fi - echoerr "There seem to be missing dynamic libs from the OS." - echoerr "Using libs from ${DYNLIBS_DIR} instead." - echoerr "NOTE: EMQX's rpm or deb package installation is recommended!" -fi - -## backward compatible -if [ -d "$ERTS_DIR/lib" ]; then - export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH" -fi - # cuttlefish try to read environment variables starting with "EMQX_" export CUTTLEFISH_ENV_OVERRIDE_PREFIX='EMQX_' @@ -207,6 +164,7 @@ usage() { echo " console: Start EMQX in an interactive Erlang shell" echo " foreground: Start EMQX in foreground mode without an interactive shell" echo " stop: Stop the running EMQX node" + echo " restart: Restart the running EMQX node" echo " ctl: Administration commands, execute '$REL_NAME ctl help' for more details" echo '' echo "More:" @@ -266,6 +224,49 @@ if [ "$ES" -ne 0 ]; then exit $ES fi +# Echo to stderr on errors +echoerr() { echo "$*" 1>&2; } + +die() { + set +x + echoerr "ERROR: $1" + errno=${2:-1} + exit "$errno" +} + +assert_node_alive() { + if ! relx_nodetool "ping" > /dev/null; then + die "node_is_not_running!" 1 + fi +} + +check_erlang_start() { + # set ERL_CRASH_DUMP_BYTES to zero so it will not write a crash dump file + env ERL_CRASH_DUMP_BYTES=0 "$BINDIR/$PROGNAME" -boot "$REL_DIR/start_clean" -eval "crypto:start(),halt()" +} + +if ! check_erlang_start >/dev/null 2>&1; then + BUILT_ON="$(head -1 "${REL_DIR}/BUILT_ON")" + ## failed to start, might be due to missing libs, try to be portable + export LD_LIBRARY_PATH="$DYNLIBS_DIR:$LD_LIBRARY_PATH" + if ! check_erlang_start; then + ## it's hopeless + echoerr "FATAL: Unable to start Erlang." + echoerr "Please make sure openssl-1.1.1 (libcrypto) and libncurses are installed." + echoerr "Also ensure it's running on the correct platform," + echoerr "this EMQX release is built for $BUILT_ON" + exit 1 + fi + echoerr "There seem to be missing dynamic libs from the OS." + echoerr "Using libs from ${DYNLIBS_DIR} instead." + echoerr "NOTE: EMQX's rpm or deb package installation is recommended!" +fi + +## backward compatible (old EMQX versions does this) +if [ -d "$ERTS_DIR/lib" ]; then + export LD_LIBRARY_PATH="$ERTS_DIR/lib:$LD_LIBRARY_PATH" +fi + if [ -z "$WITH_EPMD" ]; then EPMD_ARG="-start_epmd false -epmd_module ekka_epmd -proto_dist ekka" else