Commit Graph

8892 Commits

Author SHA1 Message Date
Spycsh c1491b8cce
Merge pull request #6369 from Spycsh/master
fix: fix apiVersion for networking.k8s.io/v1
2021-12-10 12:23:31 +01:00
JianBo He 5224da57dc
Merge pull request #6411 from HJianBo/gw-improve-apis-3
More precise gateway http-api examples
2021-12-10 16:52:49 +08:00
lafirest 82746134bb feat(emqx_slow_sus): ported emqx_slow_subs from v4.4 2021-12-10 16:42:55 +08:00
lafirest 3fc26fc4b6
Merge pull request #5987 from lafirest/refactor/ratelimit
refactor(emqx_limiter): use the new hierarchical token bucket to repl…
2021-12-10 15:26:43 +08:00
firest 8493b61cb5 refactor(eqmx_limiter): use the new hierarchical token bucket to replace the old ratelimit code 2021-12-10 14:37:23 +08:00
JianBo He fa11c6df9c test(gw): fix bad test cases 2021-12-10 10:41:38 +08:00
Spycsh a40c50f2e8 fix: fix apiVersion for networking.k8s.io/v1 2021-12-09 21:24:40 +01:00
Thales Macedo Garitezi 540e5dbc0b
Merge pull request #6344 from emqx/update-appup-ext-deps-diff-50
chore(appup): make update_appup.escript output only differences for external dependencies [5.0]

Same as #6307 .

Currently, the update_appup.escript outputs as an error the full appup
file for external dependencies, even if all the changes are already
contained in the depency. Here, we make it only output the missing
actions to be inserted, to aid in seeing what are the differences.
2021-12-09 09:15:25 -03:00
zhongwencool 64341fdc23 fix(swagger): remote api_secret field form api_key api 2021-12-09 17:57:57 +08:00
k32 98be2e15b1
Merge pull request #6405 from k32/sysmon
feat(system_monitor): Add system_monitor application
2021-12-09 10:22:40 +01:00
zhongwencool 0614c157ec fix(elvis): elvis warning 2021-12-09 16:42:10 +08:00
zhongwencool cf11f3f8ee feat(api-key): support api_key/secret 2021-12-09 16:42:10 +08:00
JianBo He d551c7977d
Merge pull request #6162 from HJianBo/port-44-exhook-feat
Pass message header to 'on_message_publish' hook
2021-12-09 16:38:12 +08:00
JianBo He 159ba63530 chore: upgrade grpc-erl to 0.6.4 2021-12-09 15:06:18 +08:00
JianBo He 5d4604701c chore: fix elvis warnings 2021-12-09 15:06:18 +08:00
JianBo He 34cc8cc7f5 chore: put the pool_size default value to avoid hot upgrade failure 2021-12-09 15:06:18 +08:00
JianBo He e7ccd88719 test(props): cover messages headers 2021-12-09 15:06:18 +08:00
JianBo He f132d09483 chore(exhook): parse pool_size 2021-12-09 15:06:18 +08:00
JianBo He 143c685452 feat(exhook): expose process pool_size for grpc client 2021-12-09 15:06:18 +08:00
JianBo He 2b7c311807 chore: upgrade grpc to 0.6.4 2021-12-09 15:06:18 +08:00
JianBo He 262fb13a71 chore(exhook): fix diaylzer warnings 2021-12-09 15:06:17 +08:00
JianBo He 20ba9d285f feat(exhook): expose headers for on_messages_publish hook 2021-12-09 15:06:17 +08:00
lafirest f25c8cdf0f
Merge pull request #6410 from lafirest/fix/lw_cmd_record
fix(emqx_lwm2m): limit the max size of cmd record
2021-12-09 14:57:01 +08:00
JianBo He e662628581 chore(gw): fix bad default value in query-string 2021-12-09 14:50:28 +08:00
lafirest c9cbaeff95 fix(emqx_lwm2m): limit the max size of cmd record 2021-12-09 14:39:11 +08:00
JimMoen 30e3d65662
Merge pull request #6409 from JimMoen/update-dashboard-version
chore(dashboard): change dashboard repo and version
2021-12-09 13:49:10 +08:00
JianBo He 028f1fa71c chore(gw): fix listener examples 2021-12-09 11:33:09 +08:00
JimMoen 257ee19be5 chore(dashboard): change dashboard repo and version 2021-12-09 11:31:31 +08:00
Shawn f7941cd2bb
Merge pull request #6387 from terry-xiaoyu/improve_connector_apis
Improve bridge and connector APIs
2021-12-09 10:54:55 +08:00
DDDHuang 7aa08a82d5
Merge pull request #6283 from DDDHuang/as_doc_example
fix: add auto subscription swagger example
2021-12-09 10:35:08 +08:00
Thales Macedo Garitezi d132f96380
Merge pull request #6407 from emqx/bugfix-live-chan-count-50
fix(live_conn): fix live connection count on race condition (5.0)

Port from #6406 to 5.0.

When multiple clients try to connect concurrently using the same
client ID, they all call `emqx_channel:ensure_connected`, increasing
the live connection count, but only one will successfully acquire the
lock for that client ID.  This means that all other clients that
increased the live connection count will not get to call neither
`emqx_channel:ensure_disconnected` nor be monitored for `DOWN`
messages, effectively causing a count leak.

By moving the increment to `emqx_cm:register_channel`, which is only
called inside the lock, we can remove this leakage.

Also, during the handling of `DOWN` messages, we now iterate over all
channel PIDs returned by `eqmx_misc:drain_down`, since it could be
that one or more PIDs are not contained in the `pmon` state.
2021-12-08 16:21:17 -03:00
Ilya Averyanov 1c9d867c5e chore(authz): add test for authz backend creation dry run 2021-12-08 21:38:10 +03:00
Ilya Averyanov b7d227d2ef chore(authz): move file backend to a separate module 2021-12-08 21:38:10 +03:00
Ilya Averyanov 056558e445 chore(authz): encapsulate authz backend logic 2021-12-08 21:38:10 +03:00
Thales Macedo Garitezi 2b5fe9179e
fix(live_conn): fix live connection count on race condition (5.0)
Port from #6406 to 5.0.

When multiple clients try to connect concurrently using the same
client ID, they all call `emqx_channel:ensure_connected`, increasing
the live connection count, but only one will successfully acquire the
lock for that client ID.  This means that all other clients that
increased the live connection count will not get to call neither
`emqx_channel:ensure_disconnected` nor be monitored for `DOWN`
messages, effectively causing a count leak.

By moving the increment to `emqx_cm:register_channel`, which is only
called inside the lock, we can remove this leakage.

Also, during the handling of `DOWN` messages, we now iterate over all
channel PIDs returned by `eqmx_misc:drain_down`, since it could be
that one or more PIDs are not contained in the `pmon` state.
2021-12-08 15:15:27 -03:00
k32 9fbc247e29 feat(system_monitor): Add system_monitor application 2021-12-08 16:34:10 +01:00
Shawn d76f82d3d2 fix(bridges): add new option 'enable' for bridge configs 2021-12-08 18:16:38 +08:00
JianBo He afb2cf19c2
Merge pull request #6297 from HJianBo/gw-improve-apis-2
Standardize HTTP-APIs return value and Status/Error Code
2021-12-08 18:02:13 +08:00
Tobias Lindahl 92f116afa4
Merge pull request #6393 from emqx/fix-takeover-race-on-enqueued-messages 2021-12-08 11:00:46 +01:00
JianBo He 7c261b5356 chore(gw): improve examples for _gateway_api 2021-12-08 17:18:39 +08:00
JianBo He e48f10d2d6 chore(gw): ignore needless args 2021-12-08 11:33:11 +08:00
JianBo He a937a3d4dc chore(gw): fix bad argument type 2021-12-08 11:13:00 +08:00
JianBo He 0eff5358ca chore(gw): add examples for gw&client api 2021-12-08 10:52:27 +08:00
Ilya Averyanov 2b0a3e8ba3 refactor(authn): unify password hashing 2021-12-07 23:38:26 +03:00
Zaiming (Stone) Shi 9276a5bc3c
Merge pull request #6394 from zmstone/fix-typo-in-hook-point-name
fix: typo takeovered -> takenover
2021-12-07 21:06:30 +01:00
Tobias Lindahl 14bef1ba31 refactor: make clauses safe for future reordering 2021-12-07 16:14:32 +01:00
Zaiming (Stone) Shi 5440b431a1 fix: typo takeovered -> takenover 2021-12-07 16:06:23 +01:00
William Yang 3fdc075b24
Merge pull request #6390 from qzhuyan/fix/william/systemd-restart-on-failure
build(deb): fix postrm for checking systemd
2021-12-07 14:41:30 +01:00
Tobias Lindahl e6ecc6ca60 fix(emqx_channel): fix race condition in session takeover
Sessions must not enqueue messages when another process is taking over
the client id, since it already passed on the message queue in the
session state.

Without this fix, messages arriving after `{takeover, 'begin'} to a
channel with no connection (i.e., a persistent session) would be lost.
2021-12-07 14:17:59 +01:00
William Yang afd07591bd build(deb): fix postrm for checking systemd 2021-12-07 13:27:46 +01:00