Commit Graph

7654 Commits

Author SHA1 Message Date
Thales Macedo Garitezi c1e993ef84
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-24 17:19:42 -03: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
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
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
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
Shawn 46838a08cc fix(resource): update testcases for after_query functions 2021-11-23 10:41:45 +08:00
Shawn 6fb464fc05
Merge pull request #6059 from tigercl/fix/ssl
fix(ssl): fix API returns the certificate file name instead of the certificate content
2021-11-23 10:38:12 +08:00
Shawn 9aa63358e6 fix(resource): type spec for resource_data() 2021-11-23 10:04:31 +08:00
Shawn 29ad6d215e feat(resource): add metrics to emqx_resource 2021-11-23 10:04:31 +08:00
Shawn 4c149f92c1 feat(bridge): support metrics for bridges 2021-11-23 09:36:10 +08:00
JianBo He 50542ec441
Merge pull request #6248 from HJianBo/gw-improve-apis-1
Add authentication data management APIs for gateway
2021-11-23 09:12:04 +08:00
zhouzb 5aa8ba45d3 fix(authn): add the case when the instance does not exist 2021-11-22 23:30:05 +01:00
zhouzb 2b282b9666 fix(ssl): Return the content of certificates in HTTP response 2021-11-22 23:30:05 +01:00
zhouzb 81d425cb27 fix(ssl): fix the issue that the content of TLS certificate is not converted to path 2021-11-22 23:30:05 +01:00
Spycsh c89a663b53 chore: refactor slog under emqx, conf and exhook 2021-11-22 23:12:17 +01:00
Zaiming (Stone) Shi c202688abf
Merge pull request #6258 from tigercl/chore/dashboard
chore(dashboard): disable by default
2021-11-22 22:34:26 +01:00
Zaiming (Stone) Shi 534dbaea2a
Merge pull request #6119 from savonarola/refactor-and-test-authn-resources
Refactor and test authn resources
2021-11-22 22:26:04 +01:00
Ilya Averyanov 071c2c99e8 refactor(authn resources): add `emqx_resource` and `emqx_authn` tests 2021-11-22 21:08:04 +03:00
Zaiming (Stone) Shi 8631076c36
Merge pull request #6260 from zmstone/5.0-build-do-not-pack-glibc
build: copy only libcrypto and libtinfo
2021-11-22 17:19:18 +01:00
Zaiming Shi 835e6f95f5 style: ensure nl at eof 2021-11-22 15:48:28 +01:00
Zaiming Shi 79d9f55dd6 build: copy only libcrypto and libtinfo 2021-11-22 15:46:38 +01:00
Zaiming (Stone) Shi b59ad6b186
Merge pull request #6252 from JimMoen/fix-clients-cluster-query
fix(mgmt): fix broken `ets:continuation` been sent between nodes
2021-11-22 15:28:16 +01:00
zhouzb 63f1d88ed3 chore(dashboard): disable by default 2021-11-22 22:23:06 +08:00
Shawn c137c2eab5
Merge pull request #5968 from terry-xiaoyu/new_bridge_config_structs
refactor(bridge): the configs for http bridges
2021-11-22 19:54:42 +08:00
Shawn a0e81226d7 fix(elvis): improve some code format 2021-11-22 19:10:00 +08:00
Shawn 37aeb28a79 fix(connector): test case conflict 2021-11-22 18:52:43 +08:00
JianBo He 1e2eac0fce test(gw): add tests for authm data-mgmt 2021-11-22 17:38:59 +08:00
JianBo He 4eb27ce25b fix(gw): fix bad paging params 2021-11-22 17:38:59 +08:00
JianBo He 7d9930b64e feat(gw): support data-management apis gw's authn 2021-11-22 17:38:59 +08:00
JianBo He 4f752fb5ab chore(gw): fix elvis warnings 2021-11-22 17:38:59 +08:00