Adds a check to `bin/emqx` to see if the OTP version being used has
support for `mnesia_hook`, which is required by Mria for using the
RLOG backend. If OTP is not compatible and the user tries to use
RLOG, a warning is printed during startup and the configuration falls
back to using the Mnesia backend.
some of the find_ functions are generated from the old rebar template
which will never be used since we:
1. always release erts
2. always generate sys.config
3. always generate vm.args
for remsh prefixed nodes, ekka pick a random port to listen on
instead of following the conventional port mapping rule:
ekka listens on 4370 for emqx or emqx0 and 4371 for emqx1 and so on
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.
OTP release handler only works with .tar.gz
as a result, we had to unpack .zip and re-pack .tar.gz
just to make OTP happy.
Now since we will be building .tar.gz packages
there is no need for this re-pack step anymore
* refine usage print
* deleted restart command, as it only works for daemon mode.
e.g. if EMQ X is started in 'foreground' mode the 'restart'
command will make it start in daemon mode
* some commands such as ertspath does not requre RPC
fix(bin_emqx): remove `vm_args` backup in `install`
The `install_upgrade.escript` depended on being able to retrieve the
`vm_args` argument from `init`, but that options has been removed
recently. Since this backup was unused, we also remove it here.
Also, the `cuttlefish` script reference is removed, since it is no longer
present in the release.
The `install_upgrade.escript` depended on being able to retrieve the
`vm_args` argument from `init`, but that options has been removed
recently. Since this backup was unused, we also remove it here.
Surprisingly enough, by doing small cirurgical changes in the existing
EMQX control scripts, we are able to get it running with Elixir and
with existing functionalities (`console`, `remote_console`, `start`,
`stop`, `ctl`, `foreground`, `eval`).
In order for us to reuse most of the functionalities implemented in
`bin/eqmx` also in the Elixir release script, common variable and
function definitions are extracted in separated bash files that can be
sourced by both Rebar and Elixir release scripts.
* fix: ./bin/emqx ping return pong
* chore: waiting longer for logger flush log to disk
* fix: change swagger page's limit from 100 to 1000
* chore: type wrong
* fix: sync log to disk by logger_disk_log_h:filesync
* feat(emqx_conf): move conf manager for emqx_machine to emqx_conf
* chore(emqx_conf): change emqx:get_config/2 to emqx_conf:get/2
* fix: common test failed
* fix: badmatch by typo wrong key
* fix(emqx_conf): get the wrong core nodes
* fix(emqx_conf): get core node's tnx_id not latest tnx_id
* fix: add ro_transation when copy conf file
* fix: delete debug info
* fix: change ekka_rlog to mria_rlog
* fix: remove cluster_rpc from emqx_machine.
* fix: don't call ekka:start/0 explicitly
* fix: ekka should be start in emqx_machine
prior to this cahnge emqx node shutdown is done by init:stop
which might have undesired stop order of the applications
in this change, emqx_machine_terminator is added to stop apps
in defined order and then terminate the node in infinite loop
prior to this fix the logger message (syslog) has the name and pid
missing.
with this change, the programe name, and its boot command is logged
to syslog, so the console boot is cleaner
* fix(hocon): fail on hocon command errors
call_hocon bash function respects exit code
* fix(bin/emax): get dist_port config from hocon
after config file refactoring (to hocon format) the grep pattern
no longer works
* fix(bin/emqx): set -o pipefail
* feat(bin/emqx): add a DEBUG option