Commit Graph

40 Commits

Author SHA1 Message Date
Zaiming (Stone) Shi 6b553e37c0 chore: pin ekka 0.17.0 previously 0.15.16
change summary:
1. otp 26
2. type spec fixes
3. dropped UDP mcast clustering
2023-12-06 20:39:26 +01:00
Ilya Averyanov 1eb75b43c4 chore(auth): split emqx_authn and emqx_authz apps 2023-10-05 13:41:50 +03:00
Thales Macedo Garitezi 0498e59c45 test: fix flaky test 2023-09-25 13:35:17 -03:00
Thales Macedo Garitezi 806017ef90 chore: check ekka proto dist module type when resolving node address
Follow up to https://github.com/emqx/emqx/pull/11637#discussion_r1334462917

Fixes https://emqx.atlassian.net/browse/EMQX-10944
2023-09-25 10:31:50 -03:00
Thales Macedo Garitezi d6935b6a67 feat: add port scan diagnostics to mria waiting for tables checks
Fixes https://emqx.atlassian.net/browse/EMQX-10944

Also updates ekka -> 0.15.15, mria -> 0.6.4

How to test
===========

1. Start 2 or more EMQX nodes and merge them in a cluster.
2. Stop them in order.
3. Start only the first node that was stopped in the previous step.
4. Wait until the log is printed.

Or, more easily:

1. Start 2 or more EMQX nodes and merge them in a cluster.
2. Stop all but one.
3. Run `mria_mnesia:diagnosis([]).` on that node.

Example output
==============

```
   Check check_open_ports should get ok but got #{msg =>
                                                     "some ports are unreachable",
                                                 results =>
                                                     #{'emqx@172.100.239.4' =>
                                                           #{open_ports =>
                                                                 #{4370 => false,
                                                                   5370 =>
                                                                       false},
                                                             ports_to_check =>
                                                                 [4370,5370],
                                                             resolved_ips =>
                                                                 [{172,100,239,
                                                                   4}],
                                                             status =>
                                                                 bad_ports},
                                                       'emqx@172.100.239.5' =>
                                                           #{open_ports =>
                                                                 #{4370 => false,
                                                                   5370 =>
                                                                       false},
                                                             ports_to_check =>
                                                                 [4370,5370],
                                                             resolved_ips =>
                                                                 [{172,100,239,
                                                                   5}],
                                                             status =>
                                                                 bad_ports}}}
```

After one node is back:

```
   Check check_open_ports should get ok but got #{msg =>
                                                     "some ports are unreachable",
                                                 results =>
                                                     #{'emqx@172.100.239.4' =>
                                                           #{ports_to_check =>
                                                                 [4370,5370],
                                                             resolved_ips =>
                                                                 [{172,100,239,
                                                                   4}],
                                                             status => ok},
                                                       'emqx@172.100.239.5' =>
                                                           #{open_ports =>
                                                                 #{4370 => false,
                                                                   5370 =>
                                                                       false},
                                                             ports_to_check =>
                                                                 [4370,5370],
                                                             resolved_ips =>
                                                                 [{172,100,239,
                                                                   5}],
                                                             status =>
                                                                 bad_ports}}}
```
2023-09-21 14:29:01 -03:00
zhongwencool 8ab6eb5638 test: start emqx_opentelemetry in emqx_machine SUITE 2023-08-25 10:09:00 +08:00
Andrew Mayorov 830ba54721
refactor(pluglib): remove `emqx_plugin_libs` application 2023-06-09 14:44:37 +03:00
Zaiming (Stone) Shi 6e2cde8224 refactor: delete emqx_statsd all together 2023-05-26 15:17:42 +02:00
Zaiming (Stone) Shi d89975c6ee test: add a test case for emqx_machine:node_status 2023-04-26 20:48:53 +02:00
Zaiming (Stone) Shi dbc10c2eed chore: update copyright year 2023 2023-01-02 09:22:27 +01:00
Shawn 45352206a3 fix(auth): remove emqx_connector from testcases of authz/authn 2022-08-22 20:20:45 +08:00
Zaiming (Stone) Shi b445182335 style: reformat emqx_machine, emqx_plugin_libs, and emqx_statsd 2022-04-23 09:55:50 +02:00
Thales Macedo Garitezi 5748b9b492
feat: allow customizing per-shard transaction log transport 2022-03-30 11:11:30 -03:00
zhongwencool 3b4eade1ad
Merge pull request #6900 from zhongwencool/restricted-shell
feat(shell): add restricted shell and user_default
2022-02-08 17:25:28 +08:00
zhongwencool 00fe866392 chore(test): add restricted_shell CT test. 2022-02-08 10:49:11 +08:00
Ilya Averyanov 17599432d1 feat(license): add license application 2022-02-07 19:05:47 +03:00
Zaiming (Stone) Shi 63167cea70 chore: update copyright 2022-01-05 20:55:00 +01:00
Zaiming (Stone) Shi 2fbe2dd0c3 fix(boot): ensure emqx_conf is the first app to boot
The first one to boot after emqx_machine
2022-01-03 12:53:49 +01:00
Thales Macedo Garitezi 11c169501e
chore(mix): fix app dependencies and reboot apps (emqx_conf)
While declaring `emqx_conf` as an application dependency of
`emqx_resource` worked for releases, it messed up the startup
relationship during tests.  Since only removing `emqx_conf` from the
`applications` key in `emqx_resource` breaks the list of apps that
need to be rebooted on config changes (since `emqx_conf` is not on any
apps dependencies list, it was not being added to the final
topologically sorted list), we now always add it as a vertex to ensure
its presence there.  This (apparently) makes the rebar3 release, the
mix release and test runs behave normally.
2021-12-23 13:48:28 -03:00
JianBo He f23d2f2c92 chore: refine case side-effect 2021-11-17 10:46:46 +08:00
zhongwencool d784e63b9f
emqx_conf (#5939)
* 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
2021-10-21 18:08:51 +08:00
k32 9fdd5e6a7e
fix(emqx_machine): Fix start/stop callbacks (#5969)
* fix(emqx_machine): Fix start/stop callbacks

* chore(ekka): Bump version to 0.11.1

* fix(router): Wait for the tables

* fix(emqx_cluster_rpc): Stop cluster RPC when joining a cluster

* fix(emqx_app): Fix a deadlock when joining the cluster

* fix(emqx_telemetry): Wait for mnesia tables

* test(ct_helper): Start ekka before emqx
2021-10-21 14:49:21 +08:00
k32 d14b8e7da9 chore(mria): ekka_rlog -> mria_rlog 2021-10-18 22:04:05 +02:00
k32 e14a62d4d6 chore(mria): ekka_mnesia:start/stop -> mria:start/stop 2021-10-18 22:04:05 +02:00
Tobias Lindahl aa19c2a908 chore: Remove emqx_ct_helpers as dependency 2021-10-15 10:40:57 +02:00
zhongwencool 93c210887b chore: don't use emqx_machine.hrl in emqx 2021-09-30 16:04:30 +08:00
zhongwencool be123f613d
Fix: apps should boots after emqx_machine_sup's children spawn. (#5851)
* fix(cluster_call): apps should start after cluster_call init

* fix: undef function

* chore: reformat code

* fix: ekka must start before emqx
2021-09-30 13:56:18 +08:00
zhongwencool cae79a0584 feat(swagger): move public page/limit/error_code to emqx_dashboard_swagger module 2021-09-24 21:51:53 +08:00
zhongwencool 65633a4ad2 chore(cluster-call): more detail about failed case 2021-09-18 12:34:20 +08:00
zhongwencool 9820027953 fix(cluster-call): fixed crash test case 2021-09-10 13:17:17 +08:00
zhongwencool 24aaa5349b chore(cluster-call): more clear function/var name 2021-09-07 10:00:19 +08:00
zhongwencool 679edbc29c feat(cluster-call): support confirm success after all mfa apply ok 2021-09-02 10:03:03 +08:00
zhongwencool 73238ed81f feat: emqx_resource support cluster_call 2021-08-26 17:23:39 +08:00
zhongwencool 4528508620 feat: replace gen_statem by gen_server 2021-08-26 17:23:38 +08:00
zhongwencool 60c1c4edba feat: move cluster_call to emqx_machine 2021-08-26 17:23:38 +08:00
Zaiming Shi 5063d3a2b3 fix(emqx_machine): ensure digraph is deleted after use
also add tests
2021-08-06 12:16:10 +02:00
Zaiming Shi 4025d31295 refactor(emqx_machine): move code from _app module to to emqx_machine 2021-08-05 14:30:59 +02:00
Zaiming Shi bc23ff5e47 feat: add graceful shutdown
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
2021-08-05 14:11:58 +02:00
Zaiming Shi e6232665a3 refactor(emqx): ensure app shutdown and reboot order
make use of application dependency to ensure start order.
also the same dependency top-sorted for shutdown and reboot order
2021-08-04 08:40:03 +02:00
Zaiming Shi e6907478ba test: move emqx_global_gc_SUITE to emqx_machine app 2021-08-04 08:36:10 +02:00