Commit Graph

7679 Commits

Author SHA1 Message Date
William Yang 6c4bcc7426 fix(systemd): add restart on failure 2021-12-01 12:03:53 +01:00
JianBo He 581cb6ac5d
Merge pull request #6268 from HJianBo/reduce-case-logs
test(gw): reduce useless log print
2021-11-29 11:03:40 +08:00
Thales Macedo Garitezi 284619ef86
Merge pull request #6310 from emqx/test-fix-possible-flakiness
test(flakiness): prevent possible flakiness in test

If the spawned process doesn't have enough time to be properly set up,
the returned stacktrace may be empty, making the test fail. By
synchronizing the startup, we know that the process will have a proper
stacktrace by the time of the assertion.
2021-11-26 08:09:05 -03:00
Ilya Averyanov 759b03a6ad
Merge pull request #6306 from savonarola/ct-output
chore(ct): remove verbose output during tests
2021-11-26 12:54:21 +03:00
zhongwencool f697028b70
Fix ping not return pong (#6285)
* 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
2021-11-26 17:02:45 +08:00
tigercl 124ba7a071
Merge pull request #6311 from emqx/release-5.0-beta.2
Sync bug fixes
2021-11-26 14:24:19 +08:00
tigercl 12d8ebcc15
Merge pull request #6303 from tigercl/fix/authn-jwt
fix(authn): fix jwt authn
2021-11-26 13:36:01 +08:00
zhouzb 349fd1608b style(authn): improve code formatting 2021-11-26 10:29:57 +08:00
JimMoen 354b2a3a19 fix(conf): change `max_topic_levels` default configuration #6295 2021-11-26 09:40:28 +08:00
Thales Macedo Garitezi d6288a0b70
test(flakiness): prevent possible flakiness in test
If the spawned process doesn't have enough time to be properly set up,
the returned stacktrace may be empty, making the test fail.  By
synchronizing the startup, we know that the process will have a proper
stacktrace by the time of the assertion.
2021-11-25 17:15:07 -03:00
Thales Macedo Garitezi b7928203b8
Merge pull request #6293 from emqx/fix-update-appup-script-50
chore(appup): minor fixes to update_appup.escript (5.0)

- Fixes clause error on `create_stub/1`.
- Small optimization: do not download the same file multiple times
  with `wget`.
- Fix: remove old file extension (`.app.src`) and preserve dirname
  when creating stubs for apps.
2021-11-25 17:05:26 -03:00
Ilya Averyanov 14b1a2fbf9
Merge pull request #6302 from savonarola/test-authn-resources-http
chore(authn): add HTTP backend tests
2021-11-25 20:05:19 +03:00
Thales Macedo Garitezi 1a6b4d2d57
chore(appup): minor fixes to update_appup.escript (5.0)
- Fixes clause error on `create_stub/1`.
- Small optimization: do not download the same file multiple times
  with `wget`.
- Fix: remove old file extension (`.app.src`) and preserve dirname
  when creating stubs for apps.
2021-11-25 13:54:31 -03:00
Ilya Averyanov ea0fa24ce5 chore(ct): remove verbose output during tests 2021-11-25 18:30:50 +03:00
Ilya Averyanov e6c2600718 chore(authn): add HTTP backend tests 2021-11-25 15:09:13 +03:00
zhouzb ecd3c9f85c test(authn): add test cases for jwt authn 2021-11-25 19:03:11 +08:00
zhouzb 15654b5b28 fix(authn): add handling of invalid secret 2021-11-25 17:17:44 +08:00
zhouzb d88bfdfe14 fix(authn): verify claims type is wrong 2021-11-25 16:42:08 +08:00
JimMoen f74e34b6a5 fix(conf): change `max_topic_levels` default configuration 2021-11-25 10:11:24 +08:00
tigercl 4a460b3a22
Merge pull request #6284 from tigercl/fix/mongo-health-check
fix(connector): fix crash in health checking of mongo connection
2021-11-25 09:23:54 +08:00
Thales Macedo Garitezi 1d33aa9fcb
Merge pull request #6289 from emqx/sys-mon-more-info
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace

This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-24 14:05:22 -03:00
Thales Macedo Garitezi db3f7ff749
feat(sys_mon): remove `current_function`
Since we now output `current_stacktrace`, `current_function` is now
redundant.
2021-11-24 12:16:16 -03:00
Thales Macedo Garitezi a41d0d49bd
test(impossible_case): remove impossible case test
Since `emqx_vm:get_process_info/1` only accepts PIDs as arguments,
it's impossible for `emqx_sys_mon:procinfo/1` to return after
receiving the atom `undefined`.
2021-11-24 11:34:36 -03:00
Thales Macedo Garitezi 75a17431d5
feat(sys_mon): Add proc_lib:initial_call/1 and current_stacktrace
This adds the information from `proc_lib:initial_call/1` and the
current stacktrace from the process info to `emqx_sys_mon:procinfo/1`
to aid in debugging some warnings with no context such as the
following:

```
2021-11-23T12:33:59.387818+00:00 [warning] info: [{old_heap_block_size,45988046},{heap_block_size,22177879},{mbuf_size,0},{stack_size,40},{old_heap_size,22354134},{heap_size,7106339}], line: 130, mfa: emqx_sys_mon:handle_info/2, msg: large_heap, procinfo: [{pid,<0.2667.0>},{memory,579763664},{total_heap_size,68510672},{heap_size,22177879},{stack_size,40},{min_heap_size,233},{initial_call,{proc_lib,init_p,5}},{current_function,{gen,do_call,4}},{registered_name,[]},{status,running},{message_queue_len,360945},{group_leader,<0.1660.0>},{priority,normal},{trap_exit,false},{reductions,16493271},{last_calls,false},{catchlevel,4},{trace,0},{suspending,[]},{sequential_trace_token,[]},{error_handler,error_handler}]
```
2021-11-24 11:24:27 -03:00
Ilya Averyanov 3400a3b978
Merge pull request #6288 from savonarola/handle-authn-backends-own-validations
fix(authn): handle authn backends own validations
2021-11-24 15:18:11 +03:00
Ilya Averyanov ac3707e4a9 fix(authn): handle authn backends own validations 2021-11-24 14:05:46 +03:00
zhouzb fb6ab93f47 fix(dialyzer): fix redundant cases 2021-11-24 18:21:08 +08:00
zhouzb 261ca3d625 fix(connector): fix crash in health checking of mongo connection 2021-11-24 16:48:35 +08:00
Tobias Lindahl ca89a8da61
Merge pull request #6274 from emqx/persistent-sessions-ram-backend
feat(persistent_sessions): add choice between ram or disc backends in…
2021-11-24 09:25:14 +01:00
JimMoen 6b1ec4f035
fix(authz): placeholder regular replace #6281 2021-11-24 13:43:19 +08:00
JimMoen d7c7292321 fix(authz): placeholder regular replace 2021-11-24 11:10:30 +08:00
Ilya Averyanov 9f04ac5bfd
Merge pull request #6269 from savonarola/test-authn-resources-mysql-pgsql
chore(authn): add MySQL & PostgreSQL backend tests
2021-11-23 20:03:52 +03:00
Spycsh fda2e86187
Merge pull request #6107 from Spycsh/slog
chore: refactor slog under emqx, conf and exhook
2021-11-23 16:39:06 +01:00
Tobias Lindahl 9a97a7a1c7 chore(persistent_session): remove quotes around boolean in config 2021-11-23 16:24:40 +01:00
Tobias Lindahl df2dda2e10 chore(persistent_session): make more table creation parameterized 2021-11-23 16:23:47 +01:00
Tobias Lindahl 9eaedbf246 test(persistent_sessions): add back test groups lost in refactoring 2021-11-23 16:17:27 +01:00
Tobias Lindahl 46788ad31b chore(persistent_sessions): add descriptions of persistent session configs 2021-11-23 13:53:04 +01:00
Tobias Lindahl 0865fc6e57 test(persistent_sessions): increase wait time for cm unregister in test 2021-11-23 13:52:02 +01:00
tigercl 060962700e
Merge pull request #6277 from tigercl/fix/mongo-connector
fix(connector): fix options handling for mongo connector
2021-11-23 20:50:47 +08:00
Tobias Lindahl 6eb4a617bc test(persistent_sessions): make another attempt at fixing flaky test 2021-11-23 13:29:47 +01:00
zhouzb 4d92e2b6af fix(connector): fix options handling for mongo connector 2021-11-23 20:01:21 +08:00
Tobias Lindahl 08acb5d435 feat(persistent_sessions): add choice between ram or disc backends in mnesia 2021-11-23 11:51:21 +01:00
Ilya Averyanov 8cc0b43de7 chore(authn): add MySQL & PostgreSQL backend tests 2021-11-23 11:52:51 +03:00
JianBo He 27270ca679 test(gw): fix elvis warnings 2021-11-23 16:36:11 +08:00
JianBo He 5204a1c6d4 test(gw): reduce useless log print 2021-11-23 16:01:40 +08:00
zhongwencool ef0e440d27
feat: http trace api for 5.0 (#6200)
* feat: port log trace http api for 5.0

* fix: name must printable unicode len<256

* fix: check-nl-at-eof warning

* fix: handler_id always atom
2021-11-23 13:49:12 +08:00
DDDHuang 6a60c17970
fix: add lw gateway endpoint placeholder support (#6267) 2021-11-23 12:08:45 +08:00
Shawn af5002733b
Merge pull request #6256 from terry-xiaoyu/resource_metrics2
Add metrics to emqx_resource and emqx_bridges
2021-11-23 11:14:25 +08:00
Thales Macedo Garitezi d7725f799c
fix(flaky_test): improve live connection count test on CI (#6257)
* fix(flaky_test): improve live connection count test on CI

It seems that a race condition that is triggered more often in CI can
make the test fail, possibly due to the ETS write not being seen by
the subsequent read in the test.

* style(elvis): fix NL in emqx_connector.conf
2021-11-23 11:12:45 +08:00
DDDHuang 21bd9bba55
fix: generate palce holder (#6250)
* fix: generate place holder

* style: whitespace cleanup

* refactor(authz): placeholder for athuz

* test: authz test suite for placeholder

* fix: lw place holder suite

* fix: auth n redis suite

Co-authored-by: JimMoen <LnJimMoen@outlook.com>
2021-11-23 10:56:43 +08:00