Explorar o código

fix(eval): use running node for rpc eval, not a fresh one

With the previous arguments, a fresh hidden node with the same name as
the expected running one was being started and commands were being run
there.  This caused commands like `ekka_cluster:info()` to report
seemingly weird results.
Thales Macedo Garitezi %!s(int64=4) %!d(string=hai) anos
pai
achega
03e0c5ef2a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      bin/emqx

+ 3 - 1
bin/emqx

@@ -864,10 +864,12 @@ case "${COMMAND}" in
         then
           "$REL_DIR/elixir" \
               --hidden \
+              --name "rand-$(relx_gen_id)-$NAME" \
               --cookie "$COOKIE" \
               --boot "$REL_DIR/start_clean" \
               --boot-var RELEASE_LIB "$ERTS_LIB_DIR" \
-              --vm-args "$(latest_vm_args 'EMQX_NODE__NAME')"\
+              --vm-args "$REL_DIR/remote.vm.args" \
+              --erl "-start_epmd false -epmd_module ekka_epmd" \
               --rpc-eval "$NAME" "$@"
         else
           relx_nodetool "eval" "$@"